委外订单材料主表数据同步.ktr 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <transformation>
  3. <info>
  4. <name>委外订单材料主表数据同步</name>
  5. <description/>
  6. <extended_description/>
  7. <trans_version/>
  8. <trans_type>Normal</trans_type>
  9. <trans_status>0</trans_status>
  10. <directory>/</directory>
  11. <parameters>
  12. </parameters>
  13. <log>
  14. <trans-log-table>
  15. <connection/>
  16. <schema/>
  17. <table/>
  18. <size_limit_lines/>
  19. <interval/>
  20. <timeout_days/>
  21. <field>
  22. <id>ID_BATCH</id>
  23. <enabled>Y</enabled>
  24. <name>ID_BATCH</name>
  25. </field>
  26. <field>
  27. <id>CHANNEL_ID</id>
  28. <enabled>Y</enabled>
  29. <name>CHANNEL_ID</name>
  30. </field>
  31. <field>
  32. <id>TRANSNAME</id>
  33. <enabled>Y</enabled>
  34. <name>TRANSNAME</name>
  35. </field>
  36. <field>
  37. <id>STATUS</id>
  38. <enabled>Y</enabled>
  39. <name>STATUS</name>
  40. </field>
  41. <field>
  42. <id>LINES_READ</id>
  43. <enabled>Y</enabled>
  44. <name>LINES_READ</name>
  45. <subject/>
  46. </field>
  47. <field>
  48. <id>LINES_WRITTEN</id>
  49. <enabled>Y</enabled>
  50. <name>LINES_WRITTEN</name>
  51. <subject/>
  52. </field>
  53. <field>
  54. <id>LINES_UPDATED</id>
  55. <enabled>Y</enabled>
  56. <name>LINES_UPDATED</name>
  57. <subject/>
  58. </field>
  59. <field>
  60. <id>LINES_INPUT</id>
  61. <enabled>Y</enabled>
  62. <name>LINES_INPUT</name>
  63. <subject/>
  64. </field>
  65. <field>
  66. <id>LINES_OUTPUT</id>
  67. <enabled>Y</enabled>
  68. <name>LINES_OUTPUT</name>
  69. <subject/>
  70. </field>
  71. <field>
  72. <id>LINES_REJECTED</id>
  73. <enabled>Y</enabled>
  74. <name>LINES_REJECTED</name>
  75. <subject/>
  76. </field>
  77. <field>
  78. <id>ERRORS</id>
  79. <enabled>Y</enabled>
  80. <name>ERRORS</name>
  81. </field>
  82. <field>
  83. <id>STARTDATE</id>
  84. <enabled>Y</enabled>
  85. <name>STARTDATE</name>
  86. </field>
  87. <field>
  88. <id>ENDDATE</id>
  89. <enabled>Y</enabled>
  90. <name>ENDDATE</name>
  91. </field>
  92. <field>
  93. <id>LOGDATE</id>
  94. <enabled>Y</enabled>
  95. <name>LOGDATE</name>
  96. </field>
  97. <field>
  98. <id>DEPDATE</id>
  99. <enabled>Y</enabled>
  100. <name>DEPDATE</name>
  101. </field>
  102. <field>
  103. <id>REPLAYDATE</id>
  104. <enabled>Y</enabled>
  105. <name>REPLAYDATE</name>
  106. </field>
  107. <field>
  108. <id>LOG_FIELD</id>
  109. <enabled>Y</enabled>
  110. <name>LOG_FIELD</name>
  111. </field>
  112. <field>
  113. <id>EXECUTING_SERVER</id>
  114. <enabled>N</enabled>
  115. <name>EXECUTING_SERVER</name>
  116. </field>
  117. <field>
  118. <id>EXECUTING_USER</id>
  119. <enabled>N</enabled>
  120. <name>EXECUTING_USER</name>
  121. </field>
  122. <field>
  123. <id>CLIENT</id>
  124. <enabled>N</enabled>
  125. <name>CLIENT</name>
  126. </field>
  127. </trans-log-table>
  128. <perf-log-table>
  129. <connection/>
  130. <schema/>
  131. <table/>
  132. <interval/>
  133. <timeout_days/>
  134. <field>
  135. <id>ID_BATCH</id>
  136. <enabled>Y</enabled>
  137. <name>ID_BATCH</name>
  138. </field>
  139. <field>
  140. <id>SEQ_NR</id>
  141. <enabled>Y</enabled>
  142. <name>SEQ_NR</name>
  143. </field>
  144. <field>
  145. <id>LOGDATE</id>
  146. <enabled>Y</enabled>
  147. <name>LOGDATE</name>
  148. </field>
  149. <field>
  150. <id>TRANSNAME</id>
  151. <enabled>Y</enabled>
  152. <name>TRANSNAME</name>
  153. </field>
  154. <field>
  155. <id>STEPNAME</id>
  156. <enabled>Y</enabled>
  157. <name>STEPNAME</name>
  158. </field>
  159. <field>
  160. <id>STEP_COPY</id>
  161. <enabled>Y</enabled>
  162. <name>STEP_COPY</name>
  163. </field>
  164. <field>
  165. <id>LINES_READ</id>
  166. <enabled>Y</enabled>
  167. <name>LINES_READ</name>
  168. </field>
  169. <field>
  170. <id>LINES_WRITTEN</id>
  171. <enabled>Y</enabled>
  172. <name>LINES_WRITTEN</name>
  173. </field>
  174. <field>
  175. <id>LINES_UPDATED</id>
  176. <enabled>Y</enabled>
  177. <name>LINES_UPDATED</name>
  178. </field>
  179. <field>
  180. <id>LINES_INPUT</id>
  181. <enabled>Y</enabled>
  182. <name>LINES_INPUT</name>
  183. </field>
  184. <field>
  185. <id>LINES_OUTPUT</id>
  186. <enabled>Y</enabled>
  187. <name>LINES_OUTPUT</name>
  188. </field>
  189. <field>
  190. <id>LINES_REJECTED</id>
  191. <enabled>Y</enabled>
  192. <name>LINES_REJECTED</name>
  193. </field>
  194. <field>
  195. <id>ERRORS</id>
  196. <enabled>Y</enabled>
  197. <name>ERRORS</name>
  198. </field>
  199. <field>
  200. <id>INPUT_BUFFER_ROWS</id>
  201. <enabled>Y</enabled>
  202. <name>INPUT_BUFFER_ROWS</name>
  203. </field>
  204. <field>
  205. <id>OUTPUT_BUFFER_ROWS</id>
  206. <enabled>Y</enabled>
  207. <name>OUTPUT_BUFFER_ROWS</name>
  208. </field>
  209. </perf-log-table>
  210. <channel-log-table>
  211. <connection/>
  212. <schema/>
  213. <table/>
  214. <timeout_days/>
  215. <field>
  216. <id>ID_BATCH</id>
  217. <enabled>Y</enabled>
  218. <name>ID_BATCH</name>
  219. </field>
  220. <field>
  221. <id>CHANNEL_ID</id>
  222. <enabled>Y</enabled>
  223. <name>CHANNEL_ID</name>
  224. </field>
  225. <field>
  226. <id>LOG_DATE</id>
  227. <enabled>Y</enabled>
  228. <name>LOG_DATE</name>
  229. </field>
  230. <field>
  231. <id>LOGGING_OBJECT_TYPE</id>
  232. <enabled>Y</enabled>
  233. <name>LOGGING_OBJECT_TYPE</name>
  234. </field>
  235. <field>
  236. <id>OBJECT_NAME</id>
  237. <enabled>Y</enabled>
  238. <name>OBJECT_NAME</name>
  239. </field>
  240. <field>
  241. <id>OBJECT_COPY</id>
  242. <enabled>Y</enabled>
  243. <name>OBJECT_COPY</name>
  244. </field>
  245. <field>
  246. <id>REPOSITORY_DIRECTORY</id>
  247. <enabled>Y</enabled>
  248. <name>REPOSITORY_DIRECTORY</name>
  249. </field>
  250. <field>
  251. <id>FILENAME</id>
  252. <enabled>Y</enabled>
  253. <name>FILENAME</name>
  254. </field>
  255. <field>
  256. <id>OBJECT_ID</id>
  257. <enabled>Y</enabled>
  258. <name>OBJECT_ID</name>
  259. </field>
  260. <field>
  261. <id>OBJECT_REVISION</id>
  262. <enabled>Y</enabled>
  263. <name>OBJECT_REVISION</name>
  264. </field>
  265. <field>
  266. <id>PARENT_CHANNEL_ID</id>
  267. <enabled>Y</enabled>
  268. <name>PARENT_CHANNEL_ID</name>
  269. </field>
  270. <field>
  271. <id>ROOT_CHANNEL_ID</id>
  272. <enabled>Y</enabled>
  273. <name>ROOT_CHANNEL_ID</name>
  274. </field>
  275. </channel-log-table>
  276. <step-log-table>
  277. <connection/>
  278. <schema/>
  279. <table/>
  280. <timeout_days/>
  281. <field>
  282. <id>ID_BATCH</id>
  283. <enabled>Y</enabled>
  284. <name>ID_BATCH</name>
  285. </field>
  286. <field>
  287. <id>CHANNEL_ID</id>
  288. <enabled>Y</enabled>
  289. <name>CHANNEL_ID</name>
  290. </field>
  291. <field>
  292. <id>LOG_DATE</id>
  293. <enabled>Y</enabled>
  294. <name>LOG_DATE</name>
  295. </field>
  296. <field>
  297. <id>TRANSNAME</id>
  298. <enabled>Y</enabled>
  299. <name>TRANSNAME</name>
  300. </field>
  301. <field>
  302. <id>STEPNAME</id>
  303. <enabled>Y</enabled>
  304. <name>STEPNAME</name>
  305. </field>
  306. <field>
  307. <id>STEP_COPY</id>
  308. <enabled>Y</enabled>
  309. <name>STEP_COPY</name>
  310. </field>
  311. <field>
  312. <id>LINES_READ</id>
  313. <enabled>Y</enabled>
  314. <name>LINES_READ</name>
  315. </field>
  316. <field>
  317. <id>LINES_WRITTEN</id>
  318. <enabled>Y</enabled>
  319. <name>LINES_WRITTEN</name>
  320. </field>
  321. <field>
  322. <id>LINES_UPDATED</id>
  323. <enabled>Y</enabled>
  324. <name>LINES_UPDATED</name>
  325. </field>
  326. <field>
  327. <id>LINES_INPUT</id>
  328. <enabled>Y</enabled>
  329. <name>LINES_INPUT</name>
  330. </field>
  331. <field>
  332. <id>LINES_OUTPUT</id>
  333. <enabled>Y</enabled>
  334. <name>LINES_OUTPUT</name>
  335. </field>
  336. <field>
  337. <id>LINES_REJECTED</id>
  338. <enabled>Y</enabled>
  339. <name>LINES_REJECTED</name>
  340. </field>
  341. <field>
  342. <id>ERRORS</id>
  343. <enabled>Y</enabled>
  344. <name>ERRORS</name>
  345. </field>
  346. <field>
  347. <id>LOG_FIELD</id>
  348. <enabled>N</enabled>
  349. <name>LOG_FIELD</name>
  350. </field>
  351. </step-log-table>
  352. <metrics-log-table>
  353. <connection/>
  354. <schema/>
  355. <table/>
  356. <timeout_days/>
  357. <field>
  358. <id>ID_BATCH</id>
  359. <enabled>Y</enabled>
  360. <name>ID_BATCH</name>
  361. </field>
  362. <field>
  363. <id>CHANNEL_ID</id>
  364. <enabled>Y</enabled>
  365. <name>CHANNEL_ID</name>
  366. </field>
  367. <field>
  368. <id>LOG_DATE</id>
  369. <enabled>Y</enabled>
  370. <name>LOG_DATE</name>
  371. </field>
  372. <field>
  373. <id>METRICS_DATE</id>
  374. <enabled>Y</enabled>
  375. <name>METRICS_DATE</name>
  376. </field>
  377. <field>
  378. <id>METRICS_CODE</id>
  379. <enabled>Y</enabled>
  380. <name>METRICS_CODE</name>
  381. </field>
  382. <field>
  383. <id>METRICS_DESCRIPTION</id>
  384. <enabled>Y</enabled>
  385. <name>METRICS_DESCRIPTION</name>
  386. </field>
  387. <field>
  388. <id>METRICS_SUBJECT</id>
  389. <enabled>Y</enabled>
  390. <name>METRICS_SUBJECT</name>
  391. </field>
  392. <field>
  393. <id>METRICS_TYPE</id>
  394. <enabled>Y</enabled>
  395. <name>METRICS_TYPE</name>
  396. </field>
  397. <field>
  398. <id>METRICS_VALUE</id>
  399. <enabled>Y</enabled>
  400. <name>METRICS_VALUE</name>
  401. </field>
  402. </metrics-log-table>
  403. </log>
  404. <maxdate>
  405. <connection/>
  406. <table/>
  407. <field/>
  408. <offset>0.0</offset>
  409. <maxdiff>0.0</maxdiff>
  410. </maxdate>
  411. <size_rowset>10000</size_rowset>
  412. <sleep_time_empty>50</sleep_time_empty>
  413. <sleep_time_full>50</sleep_time_full>
  414. <unique_connections>N</unique_connections>
  415. <feedback_shown>Y</feedback_shown>
  416. <feedback_size>50000</feedback_size>
  417. <using_thread_priorities>Y</using_thread_priorities>
  418. <shared_objects_file/>
  419. <capture_step_performance>N</capture_step_performance>
  420. <step_performance_capturing_delay>1000</step_performance_capturing_delay>
  421. <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
  422. <dependencies>
  423. </dependencies>
  424. <partitionschemas>
  425. </partitionschemas>
  426. <slaveservers>
  427. </slaveservers>
  428. <clusterschemas>
  429. </clusterschemas>
  430. <created_user>-</created_user>
  431. <created_date>2024/01/09 15:07:19.021</created_date>
  432. <modified_user>-</modified_user>
  433. <modified_date>2024/01/09 15:07:19.021</modified_date>
  434. <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
  435. <is_key_private>N</is_key_private>
  436. </info>
  437. <notepads>
  438. </notepads>
  439. <connection>
  440. <name>MOM</name>
  441. <server>${mysql_host}</server>
  442. <type>MYSQL</type>
  443. <access>Native</access>
  444. <database>${mysql_dbname}</database>
  445. <port>3306</port>
  446. <username>${mysql_username}</username>
  447. <password>${mysql_password}</password>
  448. <servername/>
  449. <data_tablespace/>
  450. <index_tablespace/>
  451. <attributes>
  452. <attribute>
  453. <code>EXTRA_OPTION_MYSQL.characterEncoding</code>
  454. <attribute>utf-8</attribute>
  455. </attribute>
  456. <attribute>
  457. <code>EXTRA_OPTION_MYSQL.defaultFetchSize</code>
  458. <attribute>5000</attribute>
  459. </attribute>
  460. <attribute>
  461. <code>EXTRA_OPTION_MYSQL.rewriteBatchedStatements</code>
  462. <attribute>true</attribute>
  463. </attribute>
  464. <attribute>
  465. <code>EXTRA_OPTION_MYSQL.useCompression</code>
  466. <attribute>true</attribute>
  467. </attribute>
  468. <attribute>
  469. <code>EXTRA_OPTION_MYSQL.useCursorFetch</code>
  470. <attribute>true</attribute>
  471. </attribute>
  472. <attribute>
  473. <code>EXTRA_OPTION_MYSQL.useServerPrepStmts</code>
  474. <attribute>true</attribute>
  475. </attribute>
  476. <attribute>
  477. <code>FORCE_IDENTIFIERS_TO_LOWERCASE</code>
  478. <attribute>N</attribute>
  479. </attribute>
  480. <attribute>
  481. <code>FORCE_IDENTIFIERS_TO_UPPERCASE</code>
  482. <attribute>N</attribute>
  483. </attribute>
  484. <attribute>
  485. <code>IS_CLUSTERED</code>
  486. <attribute>N</attribute>
  487. </attribute>
  488. <attribute>
  489. <code>PORT_NUMBER</code>
  490. <attribute>3306</attribute>
  491. </attribute>
  492. <attribute>
  493. <code>PRESERVE_RESERVED_WORD_CASE</code>
  494. <attribute>Y</attribute>
  495. </attribute>
  496. <attribute>
  497. <code>QUOTE_ALL_FIELDS</code>
  498. <attribute>N</attribute>
  499. </attribute>
  500. <attribute>
  501. <code>STREAM_RESULTS</code>
  502. <attribute>Y</attribute>
  503. </attribute>
  504. <attribute>
  505. <code>SUPPORTS_BOOLEAN_DATA_TYPE</code>
  506. <attribute>Y</attribute>
  507. </attribute>
  508. <attribute>
  509. <code>SUPPORTS_TIMESTAMP_DATA_TYPE</code>
  510. <attribute>Y</attribute>
  511. </attribute>
  512. <attribute>
  513. <code>USE_POOLING</code>
  514. <attribute>N</attribute>
  515. </attribute>
  516. </attributes>
  517. </connection>
  518. <connection>
  519. <name>U8</name>
  520. <server>${U8DB_HOST}</server>
  521. <type>GENERIC</type>
  522. <access>Native</access>
  523. <database>${U8DB_NAME}</database>
  524. <port>1433</port>
  525. <username>${sqlserver_username}</username>
  526. <password>${sqlserver_password}</password>
  527. <servername/>
  528. <data_tablespace/>
  529. <index_tablespace/>
  530. <attributes>
  531. <attribute>
  532. <code>CUSTOM_DRIVER_CLASS</code>
  533. <attribute>${sqlserver_driverclassname}</attribute>
  534. </attribute>
  535. <attribute>
  536. <code>CUSTOM_URL</code>
  537. <attribute>${sqlserver_url}</attribute>
  538. </attribute>
  539. <attribute>
  540. <code>DATABASE_DIALECT_ID</code>
  541. <attribute>Generic database</attribute>
  542. </attribute>
  543. <attribute>
  544. <code>FORCE_IDENTIFIERS_TO_LOWERCASE</code>
  545. <attribute>N</attribute>
  546. </attribute>
  547. <attribute>
  548. <code>FORCE_IDENTIFIERS_TO_UPPERCASE</code>
  549. <attribute>N</attribute>
  550. </attribute>
  551. <attribute>
  552. <code>IS_CLUSTERED</code>
  553. <attribute>N</attribute>
  554. </attribute>
  555. <attribute>
  556. <code>PORT_NUMBER</code>
  557. <attribute>1433</attribute>
  558. </attribute>
  559. <attribute>
  560. <code>PRESERVE_RESERVED_WORD_CASE</code>
  561. <attribute>Y</attribute>
  562. </attribute>
  563. <attribute>
  564. <code>QUOTE_ALL_FIELDS</code>
  565. <attribute>N</attribute>
  566. </attribute>
  567. <attribute>
  568. <code>SUPPORTS_BOOLEAN_DATA_TYPE</code>
  569. <attribute>Y</attribute>
  570. </attribute>
  571. <attribute>
  572. <code>SUPPORTS_TIMESTAMP_DATA_TYPE</code>
  573. <attribute>Y</attribute>
  574. </attribute>
  575. <attribute>
  576. <code>USE_POOLING</code>
  577. <attribute>N</attribute>
  578. </attribute>
  579. </attributes>
  580. </connection>
  581. <order>
  582. <hop>
  583. <from>插入 / 更新</from>
  584. <to>复制记录到结果</to>
  585. <enabled>Y</enabled>
  586. </hop>
  587. <hop>
  588. <from>Java 代码-id</from>
  589. <to>插入 / 更新</to>
  590. <enabled>Y</enabled>
  591. </hop>
  592. <hop>
  593. <from>表输入</from>
  594. <to>Java 代码-id</to>
  595. <enabled>Y</enabled>
  596. </hop>
  597. <hop>
  598. <from>获取变量</from>
  599. <to>表输入</to>
  600. <enabled>Y</enabled>
  601. </hop>
  602. </order>
  603. <step>
  604. <name>Java 代码-id</name>
  605. <type>UserDefinedJavaClass</type>
  606. <description/>
  607. <distribute>N</distribute>
  608. <custom_distribution/>
  609. <copies>1</copies>
  610. <partitioning>
  611. <method>none</method>
  612. <schema_name/>
  613. </partitioning>
  614. <definitions>
  615. <definition>
  616. <class_type>TRANSFORM_CLASS</class_type>
  617. <class_name>Processor</class_name>
  618. <class_source>public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException {
  619. Object[] r = getRow();
  620. if (r == null) {
  621. setOutputDone();
  622. return false;
  623. }
  624. r = createOutputRow(r, data.outputRowMeta.size());
  625. if (snowflakeIdWorker == null) {
  626. snowflakeIdWorker = new SnowflakeIdWorker(1, 1); // 设置你的workerId和datacenterId
  627. }
  628. String id = String.valueOf(snowflakeIdWorker.nextId());
  629. get(Fields.Out, "id").setValue(r, id);
  630. putRow(data.outputRowMeta, r);
  631. return true;
  632. }
  633. // 定义全局变量(放在类顶部)
  634. private static SnowflakeIdWorker snowflakeIdWorker = null;
  635. // 内部类:雪花算法实现
  636. public static class SnowflakeIdWorker {
  637. private final long twepoch = 1288834974657L;
  638. private final long workerIdBits = 5L;
  639. private final long datacenterIdBits = 5L;
  640. private final long maxWorkerId = -1L ^ (-1L &lt;&lt; workerIdBits);
  641. private final long maxDatacenterId = -1L ^ (-1L &lt;&lt; datacenterIdBits);
  642. private final long sequenceBits = 12L;
  643. private final long workerIdShift = sequenceBits;
  644. private final long datacenterIdShift = sequenceBits + workerIdBits;
  645. private final long timestampLeftShift = sequenceBits + workerIdBits + datacenterIdBits;
  646. private final long sequenceMask = -1L ^ (-1L &lt;&lt; sequenceBits);
  647. private long workerId;
  648. private long datacenterId;
  649. private long sequence = 0L;
  650. private long lastTimestamp = -1L;
  651. public SnowflakeIdWorker(long workerId, long datacenterId) {
  652. if (workerId > maxWorkerId || workerId &lt; 0) {
  653. throw new IllegalArgumentException(String.format("worker Id can't be greater than %d or less than 0", maxWorkerId));
  654. }
  655. if (datacenterId > maxDatacenterId || datacenterId &lt; 0) {
  656. throw new IllegalArgumentException(String.format("datacenter Id can't be greater than %d or less than 0", maxDatacenterId));
  657. }
  658. this.workerId = workerId;
  659. this.datacenterId = datacenterId;
  660. }
  661. public synchronized long nextId() {
  662. long timestamp = timeGen();
  663. if (timestamp &lt; lastTimestamp) {
  664. throw new RuntimeException("Clock moved backwards. Refusing to generate id for " + (lastTimestamp - timestamp) + " milliseconds");
  665. }
  666. if (lastTimestamp == timestamp) {
  667. sequence = (sequence + 1) &amp; sequenceMask;
  668. if (sequence == 0) {
  669. timestamp = tilNextMillis(lastTimestamp);
  670. }
  671. } else {
  672. sequence = 0L;
  673. }
  674. lastTimestamp = timestamp;
  675. return ((timestamp - twepoch) &lt;&lt; timestampLeftShift)
  676. | (datacenterId &lt;&lt; datacenterIdShift)
  677. | (workerId &lt;&lt; workerIdShift)
  678. | sequence;
  679. }
  680. private long tilNextMillis(long lastTimestamp) {
  681. long timestamp = timeGen();
  682. while (timestamp &lt;= lastTimestamp) {
  683. timestamp = timeGen();
  684. }
  685. return timestamp;
  686. }
  687. private long timeGen() {
  688. return System.currentTimeMillis();
  689. }
  690. }</class_source>
  691. </definition>
  692. </definitions>
  693. <fields>
  694. <field>
  695. <field_name>id</field_name>
  696. <field_type>String</field_type>
  697. <field_length>-1</field_length>
  698. <field_precision>-1</field_precision>
  699. </field>
  700. </fields>
  701. <clear_result_fields>N</clear_result_fields>
  702. <info_steps/>
  703. <target_steps/>
  704. <usage_parameters/>
  705. <attributes/>
  706. <cluster_schema/>
  707. <remotesteps>
  708. <input>
  709. </input>
  710. <output>
  711. </output>
  712. </remotesteps>
  713. <GUI>
  714. <xloc>288</xloc>
  715. <yloc>128</yloc>
  716. <draw>Y</draw>
  717. </GUI>
  718. </step>
  719. <step>
  720. <name>复制记录到结果</name>
  721. <type>RowsToResult</type>
  722. <description/>
  723. <distribute>Y</distribute>
  724. <custom_distribution/>
  725. <copies>1</copies>
  726. <partitioning>
  727. <method>none</method>
  728. <schema_name/>
  729. </partitioning>
  730. <attributes/>
  731. <cluster_schema/>
  732. <remotesteps>
  733. <input>
  734. </input>
  735. <output>
  736. </output>
  737. </remotesteps>
  738. <GUI>
  739. <xloc>592</xloc>
  740. <yloc>128</yloc>
  741. <draw>Y</draw>
  742. </GUI>
  743. </step>
  744. <step>
  745. <name>插入 / 更新</name>
  746. <type>InsertUpdate</type>
  747. <description/>
  748. <distribute>Y</distribute>
  749. <custom_distribution/>
  750. <copies>1</copies>
  751. <partitioning>
  752. <method>none</method>
  753. <schema_name/>
  754. </partitioning>
  755. <connection>MOM</connection>
  756. <commit>1000</commit>
  757. <update_bypassed>Y</update_bypassed>
  758. <lookup>
  759. <schema/>
  760. <table>wms_task_out</table>
  761. <key>
  762. <name>interface_id</name>
  763. <field>interface_id</field>
  764. <condition>=</condition>
  765. <name2/>
  766. </key>
  767. <key>
  768. <name>bill_type</name>
  769. <field>bill_type_code</field>
  770. <condition>=</condition>
  771. <name2/>
  772. </key>
  773. <value>
  774. <name>interface_id</name>
  775. <rename>interface_id</rename>
  776. <update>N</update>
  777. </value>
  778. <value>
  779. <name>interface_code</name>
  780. <rename>interface_code</rename>
  781. <update>N</update>
  782. </value>
  783. <value>
  784. <name>id</name>
  785. <rename>id</rename>
  786. <update>N</update>
  787. </value>
  788. <value>
  789. <name>bill_type_code</name>
  790. <rename>bill_type</rename>
  791. <update>N</update>
  792. </value>
  793. <value>
  794. <name>task_type</name>
  795. <rename>task_type</rename>
  796. <update>N</update>
  797. </value>
  798. <value>
  799. <name>task_date</name>
  800. <rename>task_date</rename>
  801. <update>N</update>
  802. </value>
  803. <value>
  804. <name>task_code</name>
  805. <rename>task_code</rename>
  806. <update>N</update>
  807. </value>
  808. <value>
  809. <name>dept_code</name>
  810. <rename>dept_code</rename>
  811. <update>N</update>
  812. </value>
  813. <value>
  814. <name>employee_code</name>
  815. <rename>employee_code</rename>
  816. <update>N</update>
  817. </value>
  818. <value>
  819. <name>supplier_code</name>
  820. <rename>supplier_code</rename>
  821. <update>N</update>
  822. </value>
  823. <value>
  824. <name>create_id</name>
  825. <rename>sync_id</rename>
  826. <update>N</update>
  827. </value>
  828. <value>
  829. <name>create_by</name>
  830. <rename>sync_name</rename>
  831. <update>N</update>
  832. </value>
  833. <value>
  834. <name>create_time</name>
  835. <rename>sync_time</rename>
  836. <update>N</update>
  837. </value>
  838. </lookup>
  839. <attributes/>
  840. <cluster_schema/>
  841. <remotesteps>
  842. <input>
  843. </input>
  844. <output>
  845. </output>
  846. </remotesteps>
  847. <GUI>
  848. <xloc>448</xloc>
  849. <yloc>128</yloc>
  850. <draw>Y</draw>
  851. </GUI>
  852. </step>
  853. <step>
  854. <name>表输入</name>
  855. <type>TableInput</type>
  856. <description/>
  857. <distribute>Y</distribute>
  858. <custom_distribution/>
  859. <copies>1</copies>
  860. <partitioning>
  861. <method>none</method>
  862. <schema_name/>
  863. </partitioning>
  864. <connection>U8</connection>
  865. <sql>DECLARE @USER_NAME VARCHAR(50),@USER_ID INT,@BEGIN_DATE DATE,@END_DATE DATE,@DEPT_CODE VARCHAR(50)
  866. SET @USER_NAME = CASE '${USER_NAME}' WHEN '' THEN '管理员(kettle)' ELSE '${USER_NAME}' END
  867. SET @USER_ID = CASE 0${USER_ID} WHEN 0 THEN 1 ELSE 0${USER_ID} END
  868. SET @BEGIN_DATE = CASE '${BEGIN_DATE}' WHEN '' THEN CONVERT(VARCHAR(100), GETDATE(), 23) ELSE '${BEGIN_DATE}' END
  869. SET @END_DATE = CASE '${BEGIN_DATE}' WHEN '' THEN CONVERT(VARCHAR(100), DATEADD(DAY, 1, GETDATE()), 23) ELSE '${END_DATE}' END
  870. SET @DEPT_CODE = '${DEPT_CODE}'
  871. SELECT
  872. T1.MoId AS interface_id
  873. ,T1.cCode AS interface_code
  874. ,-1 AS task_type --1入库、-1入库退、-1出库、1出库退
  875. ,2 AS bill_type --1生产订单、2委外订单、3委外到货单、4采购订单、5采购到货单、6销售订单、7销售发货单
  876. ,'OT2-'+T1.cCode AS task_code
  877. ,CONVERT(DATE,T1.dDate) AS task_date
  878. ,T1.cDepCode AS dept_code
  879. ,T1.cPersonCode AS employee_code
  880. ,T1.cVenCode AS supplier_code
  881. ,@USER_NAME AS sync_name
  882. ,@USER_ID AS sync_id
  883. ,GETDATE() AS sync_time
  884. FROM OM_MOMain T1
  885. WHERE 1=1
  886. AND T1.cState IN(1) --1审核 2关闭
  887. AND EXISTS (SELECT 1 FROM OM_MODetails K1,OM_MOMaterials K2 WHERE T1.MoId =K1.MoId AND K1.MODetailsID =K2.MODetailsID AND ISNULL(K2.iSendQTY,0) =0)
  888. AND CONVERT(DATE,T1.dDate) BETWEEN @BEGIN_DATE AND @END_DATE
  889. AND ((@DEPT_CODE ='' AND 1=1)OR(@DEPT_CODE ='${DEPT_CODE}' AND 1=1)OR(@DEPT_CODE&lt;&gt;'' AND @DEPT_CODE =ISNULL(T1.cDepCode,'')))
  890. </sql>
  891. <limit>0</limit>
  892. <lookup/>
  893. <execute_each_row>N</execute_each_row>
  894. <variables_active>Y</variables_active>
  895. <lazy_conversion_active>N</lazy_conversion_active>
  896. <cached_row_meta_active>N</cached_row_meta_active>
  897. <row-meta>
  898. <value-meta>
  899. <type>Integer</type>
  900. <storagetype>normal</storagetype>
  901. <name>interface_id</name>
  902. <length>9</length>
  903. <precision>0</precision>
  904. <origin>表输入</origin>
  905. <comments>interface_id</comments>
  906. <conversion_Mask>####0;-####0</conversion_Mask>
  907. <decimal_symbol>.</decimal_symbol>
  908. <grouping_symbol>,</grouping_symbol>
  909. <currency_symbol/>
  910. <trim_type>none</trim_type>
  911. <case_insensitive>N</case_insensitive>
  912. <collator_disabled>Y</collator_disabled>
  913. <collator_strength>0</collator_strength>
  914. <sort_descending>N</sort_descending>
  915. <output_padding>N</output_padding>
  916. <date_format_lenient>N</date_format_lenient>
  917. <date_format_locale>zh_CN</date_format_locale>
  918. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  919. <lenient_string_to_number>N</lenient_string_to_number>
  920. </value-meta>
  921. <value-meta>
  922. <type>String</type>
  923. <storagetype>normal</storagetype>
  924. <name>interface_code</name>
  925. <length>30</length>
  926. <precision>-1</precision>
  927. <origin>表输入</origin>
  928. <comments>interface_code</comments>
  929. <conversion_Mask/>
  930. <decimal_symbol>.</decimal_symbol>
  931. <grouping_symbol>,</grouping_symbol>
  932. <currency_symbol/>
  933. <trim_type>none</trim_type>
  934. <case_insensitive>N</case_insensitive>
  935. <collator_disabled>Y</collator_disabled>
  936. <collator_strength>0</collator_strength>
  937. <sort_descending>N</sort_descending>
  938. <output_padding>N</output_padding>
  939. <date_format_lenient>N</date_format_lenient>
  940. <date_format_locale>zh_CN</date_format_locale>
  941. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  942. <lenient_string_to_number>N</lenient_string_to_number>
  943. </value-meta>
  944. <value-meta>
  945. <type>Integer</type>
  946. <storagetype>normal</storagetype>
  947. <name>task_type</name>
  948. <length>9</length>
  949. <precision>0</precision>
  950. <origin>表输入</origin>
  951. <comments>task_type</comments>
  952. <conversion_Mask>####0;-####0</conversion_Mask>
  953. <decimal_symbol>.</decimal_symbol>
  954. <grouping_symbol>,</grouping_symbol>
  955. <currency_symbol/>
  956. <trim_type>none</trim_type>
  957. <case_insensitive>N</case_insensitive>
  958. <collator_disabled>Y</collator_disabled>
  959. <collator_strength>0</collator_strength>
  960. <sort_descending>N</sort_descending>
  961. <output_padding>N</output_padding>
  962. <date_format_lenient>N</date_format_lenient>
  963. <date_format_locale>zh_CN</date_format_locale>
  964. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  965. <lenient_string_to_number>N</lenient_string_to_number>
  966. </value-meta>
  967. <value-meta>
  968. <type>Integer</type>
  969. <storagetype>normal</storagetype>
  970. <name>bill_type</name>
  971. <length>9</length>
  972. <precision>0</precision>
  973. <origin>表输入</origin>
  974. <comments>bill_type</comments>
  975. <conversion_Mask>####0;-####0</conversion_Mask>
  976. <decimal_symbol>.</decimal_symbol>
  977. <grouping_symbol>,</grouping_symbol>
  978. <currency_symbol/>
  979. <trim_type>none</trim_type>
  980. <case_insensitive>N</case_insensitive>
  981. <collator_disabled>Y</collator_disabled>
  982. <collator_strength>0</collator_strength>
  983. <sort_descending>N</sort_descending>
  984. <output_padding>N</output_padding>
  985. <date_format_lenient>N</date_format_lenient>
  986. <date_format_locale>zh_CN</date_format_locale>
  987. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  988. <lenient_string_to_number>N</lenient_string_to_number>
  989. </value-meta>
  990. <value-meta>
  991. <type>String</type>
  992. <storagetype>normal</storagetype>
  993. <name>task_code</name>
  994. <length>34</length>
  995. <precision>-1</precision>
  996. <origin>表输入</origin>
  997. <comments>task_code</comments>
  998. <conversion_Mask/>
  999. <decimal_symbol>.</decimal_symbol>
  1000. <grouping_symbol>,</grouping_symbol>
  1001. <currency_symbol/>
  1002. <trim_type>none</trim_type>
  1003. <case_insensitive>N</case_insensitive>
  1004. <collator_disabled>Y</collator_disabled>
  1005. <collator_strength>0</collator_strength>
  1006. <sort_descending>N</sort_descending>
  1007. <output_padding>N</output_padding>
  1008. <date_format_lenient>N</date_format_lenient>
  1009. <date_format_locale>zh_CN</date_format_locale>
  1010. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1011. <lenient_string_to_number>N</lenient_string_to_number>
  1012. </value-meta>
  1013. <value-meta>
  1014. <type>String</type>
  1015. <storagetype>normal</storagetype>
  1016. <name>task_date</name>
  1017. <length>10</length>
  1018. <precision>-1</precision>
  1019. <origin>表输入</origin>
  1020. <comments>task_date</comments>
  1021. <conversion_Mask/>
  1022. <decimal_symbol>.</decimal_symbol>
  1023. <grouping_symbol>,</grouping_symbol>
  1024. <currency_symbol/>
  1025. <trim_type>none</trim_type>
  1026. <case_insensitive>N</case_insensitive>
  1027. <collator_disabled>Y</collator_disabled>
  1028. <collator_strength>0</collator_strength>
  1029. <sort_descending>N</sort_descending>
  1030. <output_padding>N</output_padding>
  1031. <date_format_lenient>N</date_format_lenient>
  1032. <date_format_locale>zh_CN</date_format_locale>
  1033. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1034. <lenient_string_to_number>N</lenient_string_to_number>
  1035. </value-meta>
  1036. <value-meta>
  1037. <type>String</type>
  1038. <storagetype>normal</storagetype>
  1039. <name>dept_code</name>
  1040. <length>12</length>
  1041. <precision>-1</precision>
  1042. <origin>表输入</origin>
  1043. <comments>dept_code</comments>
  1044. <conversion_Mask/>
  1045. <decimal_symbol>.</decimal_symbol>
  1046. <grouping_symbol>,</grouping_symbol>
  1047. <currency_symbol/>
  1048. <trim_type>none</trim_type>
  1049. <case_insensitive>N</case_insensitive>
  1050. <collator_disabled>Y</collator_disabled>
  1051. <collator_strength>0</collator_strength>
  1052. <sort_descending>N</sort_descending>
  1053. <output_padding>N</output_padding>
  1054. <date_format_lenient>N</date_format_lenient>
  1055. <date_format_locale>zh_CN</date_format_locale>
  1056. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1057. <lenient_string_to_number>N</lenient_string_to_number>
  1058. </value-meta>
  1059. <value-meta>
  1060. <type>String</type>
  1061. <storagetype>normal</storagetype>
  1062. <name>employee_code</name>
  1063. <length>20</length>
  1064. <precision>-1</precision>
  1065. <origin>表输入</origin>
  1066. <comments>employee_code</comments>
  1067. <conversion_Mask/>
  1068. <decimal_symbol>.</decimal_symbol>
  1069. <grouping_symbol>,</grouping_symbol>
  1070. <currency_symbol/>
  1071. <trim_type>none</trim_type>
  1072. <case_insensitive>N</case_insensitive>
  1073. <collator_disabled>Y</collator_disabled>
  1074. <collator_strength>0</collator_strength>
  1075. <sort_descending>N</sort_descending>
  1076. <output_padding>N</output_padding>
  1077. <date_format_lenient>N</date_format_lenient>
  1078. <date_format_locale>zh_CN</date_format_locale>
  1079. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1080. <lenient_string_to_number>N</lenient_string_to_number>
  1081. </value-meta>
  1082. <value-meta>
  1083. <type>String</type>
  1084. <storagetype>normal</storagetype>
  1085. <name>supplier_code</name>
  1086. <length>20</length>
  1087. <precision>-1</precision>
  1088. <origin>表输入</origin>
  1089. <comments>supplier_code</comments>
  1090. <conversion_Mask/>
  1091. <decimal_symbol>.</decimal_symbol>
  1092. <grouping_symbol>,</grouping_symbol>
  1093. <currency_symbol/>
  1094. <trim_type>none</trim_type>
  1095. <case_insensitive>N</case_insensitive>
  1096. <collator_disabled>Y</collator_disabled>
  1097. <collator_strength>0</collator_strength>
  1098. <sort_descending>N</sort_descending>
  1099. <output_padding>N</output_padding>
  1100. <date_format_lenient>N</date_format_lenient>
  1101. <date_format_locale>zh_CN</date_format_locale>
  1102. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1103. <lenient_string_to_number>N</lenient_string_to_number>
  1104. </value-meta>
  1105. <value-meta>
  1106. <type>String</type>
  1107. <storagetype>normal</storagetype>
  1108. <name>sync_name</name>
  1109. <length>50</length>
  1110. <precision>-1</precision>
  1111. <origin>表输入</origin>
  1112. <comments>sync_name</comments>
  1113. <conversion_Mask/>
  1114. <decimal_symbol>.</decimal_symbol>
  1115. <grouping_symbol>,</grouping_symbol>
  1116. <currency_symbol/>
  1117. <trim_type>none</trim_type>
  1118. <case_insensitive>N</case_insensitive>
  1119. <collator_disabled>Y</collator_disabled>
  1120. <collator_strength>0</collator_strength>
  1121. <sort_descending>N</sort_descending>
  1122. <output_padding>N</output_padding>
  1123. <date_format_lenient>N</date_format_lenient>
  1124. <date_format_locale>zh_CN</date_format_locale>
  1125. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1126. <lenient_string_to_number>N</lenient_string_to_number>
  1127. </value-meta>
  1128. <value-meta>
  1129. <type>Integer</type>
  1130. <storagetype>normal</storagetype>
  1131. <name>sync_id</name>
  1132. <length>9</length>
  1133. <precision>0</precision>
  1134. <origin>表输入</origin>
  1135. <comments>sync_id</comments>
  1136. <conversion_Mask>####0;-####0</conversion_Mask>
  1137. <decimal_symbol>.</decimal_symbol>
  1138. <grouping_symbol>,</grouping_symbol>
  1139. <currency_symbol/>
  1140. <trim_type>none</trim_type>
  1141. <case_insensitive>N</case_insensitive>
  1142. <collator_disabled>Y</collator_disabled>
  1143. <collator_strength>0</collator_strength>
  1144. <sort_descending>N</sort_descending>
  1145. <output_padding>N</output_padding>
  1146. <date_format_lenient>N</date_format_lenient>
  1147. <date_format_locale>zh_CN</date_format_locale>
  1148. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1149. <lenient_string_to_number>N</lenient_string_to_number>
  1150. </value-meta>
  1151. <value-meta>
  1152. <type>Timestamp</type>
  1153. <storagetype>normal</storagetype>
  1154. <name>sync_time</name>
  1155. <length>3</length>
  1156. <precision>-1</precision>
  1157. <origin>表输入</origin>
  1158. <comments>sync_time</comments>
  1159. <conversion_Mask/>
  1160. <decimal_symbol>.</decimal_symbol>
  1161. <grouping_symbol>,</grouping_symbol>
  1162. <currency_symbol/>
  1163. <trim_type>none</trim_type>
  1164. <case_insensitive>N</case_insensitive>
  1165. <collator_disabled>Y</collator_disabled>
  1166. <collator_strength>0</collator_strength>
  1167. <sort_descending>N</sort_descending>
  1168. <output_padding>N</output_padding>
  1169. <date_format_lenient>N</date_format_lenient>
  1170. <date_format_locale>zh_CN</date_format_locale>
  1171. <date_format_timezone>Asia/Shanghai</date_format_timezone>
  1172. <lenient_string_to_number>N</lenient_string_to_number>
  1173. </value-meta>
  1174. </row-meta>
  1175. <attributes/>
  1176. <cluster_schema/>
  1177. <remotesteps>
  1178. <input>
  1179. </input>
  1180. <output>
  1181. </output>
  1182. </remotesteps>
  1183. <GUI>
  1184. <xloc>144</xloc>
  1185. <yloc>128</yloc>
  1186. <draw>Y</draw>
  1187. </GUI>
  1188. </step>
  1189. <step>
  1190. <name>获取变量</name>
  1191. <type>GetVariable</type>
  1192. <description/>
  1193. <distribute>Y</distribute>
  1194. <custom_distribution/>
  1195. <copies>1</copies>
  1196. <partitioning>
  1197. <method>none</method>
  1198. <schema_name/>
  1199. </partitioning>
  1200. <fields>
  1201. <field>
  1202. <name>mysql_driverclassname</name>
  1203. <variable>${mysql_driverclassname}</variable>
  1204. <type>String</type>
  1205. <format/>
  1206. <currency/>
  1207. <decimal/>
  1208. <group/>
  1209. <length>-1</length>
  1210. <precision>-1</precision>
  1211. <trim_type>none</trim_type>
  1212. </field>
  1213. <field>
  1214. <name>mysql_password</name>
  1215. <variable>${mysql_password}</variable>
  1216. <type>String</type>
  1217. <format/>
  1218. <currency/>
  1219. <decimal/>
  1220. <group/>
  1221. <length>-1</length>
  1222. <precision>-1</precision>
  1223. <trim_type>none</trim_type>
  1224. </field>
  1225. <field>
  1226. <name>mysql_url</name>
  1227. <variable>${mysql_url}</variable>
  1228. <type>String</type>
  1229. <format/>
  1230. <currency/>
  1231. <decimal/>
  1232. <group/>
  1233. <length>-1</length>
  1234. <precision>-1</precision>
  1235. <trim_type>none</trim_type>
  1236. </field>
  1237. <field>
  1238. <name>mysql_username</name>
  1239. <variable>${mysql_username}</variable>
  1240. <type>String</type>
  1241. <format/>
  1242. <currency/>
  1243. <decimal/>
  1244. <group/>
  1245. <length>-1</length>
  1246. <precision>-1</precision>
  1247. <trim_type>none</trim_type>
  1248. </field>
  1249. <field>
  1250. <name>USER_ID</name>
  1251. <variable>${USER_ID}</variable>
  1252. <type>String</type>
  1253. <format/>
  1254. <currency/>
  1255. <decimal/>
  1256. <group/>
  1257. <length>-1</length>
  1258. <precision>-1</precision>
  1259. <trim_type>none</trim_type>
  1260. </field>
  1261. <field>
  1262. <name>sqlserver_driverclassname</name>
  1263. <variable>${sqlserver_driverclassname}</variable>
  1264. <type>String</type>
  1265. <format/>
  1266. <currency/>
  1267. <decimal/>
  1268. <group/>
  1269. <length>-1</length>
  1270. <precision>-1</precision>
  1271. <trim_type>none</trim_type>
  1272. </field>
  1273. <field>
  1274. <name>sqlserver_password</name>
  1275. <variable>${sqlserver_password}</variable>
  1276. <type>String</type>
  1277. <format/>
  1278. <currency/>
  1279. <decimal/>
  1280. <group/>
  1281. <length>-1</length>
  1282. <precision>-1</precision>
  1283. <trim_type>none</trim_type>
  1284. </field>
  1285. <field>
  1286. <name>sqlserver_url</name>
  1287. <variable>${sqlserver_url}</variable>
  1288. <type>String</type>
  1289. <format/>
  1290. <currency/>
  1291. <decimal/>
  1292. <group/>
  1293. <length>-1</length>
  1294. <precision>-1</precision>
  1295. <trim_type>none</trim_type>
  1296. </field>
  1297. <field>
  1298. <name>sqlserver_username</name>
  1299. <variable>${sqlserver_username}</variable>
  1300. <type>String</type>
  1301. <format/>
  1302. <currency/>
  1303. <decimal/>
  1304. <group/>
  1305. <length>-1</length>
  1306. <precision>-1</precision>
  1307. <trim_type>none</trim_type>
  1308. </field>
  1309. <field>
  1310. <name>USER_NAME</name>
  1311. <variable>${USER_NAME}</variable>
  1312. <type>String</type>
  1313. <format/>
  1314. <currency/>
  1315. <decimal/>
  1316. <group/>
  1317. <length>-1</length>
  1318. <precision>-1</precision>
  1319. <trim_type>none</trim_type>
  1320. </field>
  1321. <field>
  1322. <name>BEGIN_DATE</name>
  1323. <variable>${BEGIN_DATE}</variable>
  1324. <type>String</type>
  1325. <format/>
  1326. <currency/>
  1327. <decimal/>
  1328. <group/>
  1329. <length>-1</length>
  1330. <precision>-1</precision>
  1331. <trim_type>none</trim_type>
  1332. </field>
  1333. <field>
  1334. <name>END_DATE</name>
  1335. <variable>${END_DATE}</variable>
  1336. <type>String</type>
  1337. <format/>
  1338. <currency/>
  1339. <decimal/>
  1340. <group/>
  1341. <length>-1</length>
  1342. <precision>-1</precision>
  1343. <trim_type>none</trim_type>
  1344. </field>
  1345. <field>
  1346. <name>DEPT_CODE</name>
  1347. <variable>${DEPT_CODE}</variable>
  1348. <type>String</type>
  1349. <format/>
  1350. <currency/>
  1351. <decimal/>
  1352. <group/>
  1353. <length>-1</length>
  1354. <precision>-1</precision>
  1355. <trim_type>none</trim_type>
  1356. </field>
  1357. <field>
  1358. <name>mysql_host</name>
  1359. <variable>${mysql_host}</variable>
  1360. <type>String</type>
  1361. <format/>
  1362. <currency/>
  1363. <decimal/>
  1364. <group/>
  1365. <length>-1</length>
  1366. <precision>-1</precision>
  1367. <trim_type>none</trim_type>
  1368. </field>
  1369. <field>
  1370. <name>mysql_dbname</name>
  1371. <variable>${mysql_dbname}</variable>
  1372. <type>String</type>
  1373. <format/>
  1374. <currency/>
  1375. <decimal/>
  1376. <group/>
  1377. <length>-1</length>
  1378. <precision>-1</precision>
  1379. <trim_type>none</trim_type>
  1380. </field>
  1381. </fields>
  1382. <attributes/>
  1383. <cluster_schema/>
  1384. <remotesteps>
  1385. <input>
  1386. </input>
  1387. <output>
  1388. </output>
  1389. </remotesteps>
  1390. <GUI>
  1391. <xloc>164</xloc>
  1392. <yloc>490</yloc>
  1393. <draw>Y</draw>
  1394. </GUI>
  1395. </step>
  1396. <step_error_handling>
  1397. </step_error_handling>
  1398. <slave-step-copy-partition-distribution>
  1399. </slave-step-copy-partition-distribution>
  1400. <slave_transformation>N</slave_transformation>
  1401. <attributes/>
  1402. </transformation>