mem_memberterminal.ktr 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <transformation>
  3. <info>
  4. <name>mem_memberterminal</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>2</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>2019/05/14 14:56:48.089</created_date>
  432. <modified_user>-</modified_user>
  433. <modified_date>2019/05/14 14:56:48.089</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>MallSqlserver</name>
  441. <server>192.168.50.32</server>
  442. <type>MSSQLNATIVE</type>
  443. <access>Native</access>
  444. <database>Mall</database>
  445. <port>1433</port>
  446. <username>sa</username>
  447. <password>Encrypted 2be98afc819c69e8ea300ff228dd38f99</password>
  448. <servername/>
  449. <data_tablespace/>
  450. <index_tablespace/>
  451. <attributes>
  452. <attribute>
  453. <code>EXTRA_OPTION_MSSQLNATIVE.defaultRowPrefetch</code>
  454. <attribute>200</attribute>
  455. </attribute>
  456. <attribute>
  457. <code>EXTRA_OPTION_MSSQLNATIVE.readTimeout</code>
  458. <attribute>60</attribute>
  459. </attribute>
  460. <attribute>
  461. <code>FORCE_IDENTIFIERS_TO_LOWERCASE</code>
  462. <attribute>N</attribute>
  463. </attribute>
  464. <attribute>
  465. <code>FORCE_IDENTIFIERS_TO_UPPERCASE</code>
  466. <attribute>N</attribute>
  467. </attribute>
  468. <attribute>
  469. <code>INITIAL_POOL_SIZE</code>
  470. <attribute>100</attribute>
  471. </attribute>
  472. <attribute>
  473. <code>IS_CLUSTERED</code>
  474. <attribute>N</attribute>
  475. </attribute>
  476. <attribute>
  477. <code>MAXIMUM_POOL_SIZE</code>
  478. <attribute>300</attribute>
  479. </attribute>
  480. <attribute>
  481. <code>MSSQLUseIntegratedSecurity</code>
  482. <attribute>false</attribute>
  483. </attribute>
  484. <attribute>
  485. <code>MSSQL_DOUBLE_DECIMAL_SEPARATOR</code>
  486. <attribute>N</attribute>
  487. </attribute>
  488. <attribute>
  489. <code>PORT_NUMBER</code>
  490. <attribute>1433</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>SUPPORTS_BOOLEAN_DATA_TYPE</code>
  502. <attribute>Y</attribute>
  503. </attribute>
  504. <attribute>
  505. <code>SUPPORTS_TIMESTAMP_DATA_TYPE</code>
  506. <attribute>Y</attribute>
  507. </attribute>
  508. <attribute>
  509. <code>USE_POOLING</code>
  510. <attribute>Y</attribute>
  511. </attribute>
  512. </attributes>
  513. </connection>
  514. <order>
  515. <hop>
  516. <from>terminaldoc表输入</from>
  517. <to>Java 代码</to>
  518. <enabled>Y</enabled>
  519. </hop>
  520. <hop>
  521. <from>Java 代码</from>
  522. <to>Elasticsearch bulk insert</to>
  523. <enabled>Y</enabled>
  524. </hop>
  525. <hop>
  526. <from>terminaldoc表输入 2</from>
  527. <to>Java 代码 2</to>
  528. <enabled>N</enabled>
  529. </hop>
  530. <hop>
  531. <from>terminaldoc表输入 3</from>
  532. <to>Java 代码 3</to>
  533. <enabled>Y</enabled>
  534. </hop>
  535. <hop>
  536. <from>Java 代码 2</from>
  537. <to>Elasticsearch bulk insert</to>
  538. <enabled>Y</enabled>
  539. </hop>
  540. <hop>
  541. <from>Java 代码 3</from>
  542. <to>Elasticsearch bulk insert</to>
  543. <enabled>Y</enabled>
  544. </hop>
  545. </order>
  546. <step>
  547. <name>Elasticsearch bulk insert</name>
  548. <type>ElasticSearchBulk</type>
  549. <description/>
  550. <distribute>Y</distribute>
  551. <custom_distribution/>
  552. <copies>1</copies>
  553. <partitioning>
  554. <method>none</method>
  555. <schema_name/>
  556. </partitioning>
  557. <general>
  558. <index>crm_memberterminal</index>
  559. <type>_doc</type>
  560. <batchSize>100</batchSize>
  561. <timeout>100</timeout>
  562. <timeoutUnit>SECONDS</timeoutUnit>
  563. <isJson>N</isJson>
  564. <idField>termphoneid</idField>
  565. <overwriteIfExists>Y</overwriteIfExists>
  566. <useOutput>N</useOutput>
  567. <stopOnError>Y</stopOnError>
  568. </general>
  569. <fields>
  570. </fields>
  571. <servers>
  572. <server>
  573. <address>192.168.50.32</address>
  574. <port>9300</port>
  575. </server>
  576. </servers>
  577. <settings>
  578. <setting>
  579. <name>cluster.name</name>
  580. <value>es</value>
  581. </setting>
  582. <setting>
  583. <name>custom.fields.aliase</name>
  584. <value>mem_memberterminal</value>
  585. </setting>
  586. </settings>
  587. <attributes/>
  588. <cluster_schema/>
  589. <remotesteps>
  590. <input>
  591. </input>
  592. <output>
  593. </output>
  594. </remotesteps>
  595. <GUI>
  596. <xloc>368</xloc>
  597. <yloc>128</yloc>
  598. <draw>Y</draw>
  599. </GUI>
  600. </step>
  601. <step>
  602. <name>Java 代码</name>
  603. <type>UserDefinedJavaClass</type>
  604. <description/>
  605. <distribute>Y</distribute>
  606. <custom_distribution/>
  607. <copies>10</copies>
  608. <partitioning>
  609. <method>none</method>
  610. <schema_name/>
  611. </partitioning>
  612. <definitions>
  613. <definition>
  614. <class_type>TRANSFORM_CLASS</class_type>
  615. <class_name>Processor</class_name>
  616. <class_source>import java.sql.*;
  617. import org.pentaho.di.core.database.*;
  618. import org.apache.http.HttpHost;
  619. import org.elasticsearch.ElasticsearchException;
  620. import org.elasticsearch.action.get.GetRequest;
  621. import org.elasticsearch.action.get.GetResponse;
  622. import org.elasticsearch.client.RestHighLevelClient;
  623. import org.elasticsearch.client.RequestOptions;
  624. import org.elasticsearch.client.RestClient;
  625. import org.elasticsearch.common.Strings;
  626. import org.elasticsearch.rest.RestStatus;
  627. import org.elasticsearch.search.fetch.subphase.FetchSourceContext;
  628. import org.elasticsearch.action.update.UpdateRequest;
  629. import org.elasticsearch.action.update.UpdateResponse;
  630. import org.elasticsearch.common.xcontent.XContentBuilder;
  631. import org.elasticsearch.common.xcontent.XContentFactory;
  632. import org.elasticsearch.script.Script;
  633. import java.lang.reflect.InvocationTargetException;
  634. import java.lang.reflect.Method;
  635. import com.microsoft.sqlserver.jdbc.SQLServerException;
  636. Database database = null;
  637. PreparedStatement stat = null;
  638. PreparedStatement stat1 = null;
  639. RestHighLevelClient client = new RestHighLevelClient(
  640. RestClient.builder(
  641. new HttpHost[]{new HttpHost("192.168.50.32", 9200, "http")}));
  642. Integer index = 0;
  643. public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException
  644. {
  645. //logBasic("start---");
  646. String type = getVariable("type");
  647. String indexs = getVariable("index");
  648. //if (indexs != null) index = Integer.parseInt(indexs);
  649. Object[] r = getRow();
  650. if (r == null) {
  651. try {
  652. if (stat!=null) {
  653. stat.close();
  654. }
  655. if (stat1!=null) {
  656. stat1.close();
  657. }
  658. if (database!=null) {
  659. database.disconnect();
  660. }
  661. if(client!=null){
  662. client.close();
  663. }
  664. }
  665. catch(Exception e) {
  666. throw new KettleException(e);
  667. }
  668. setOutputDone();
  669. return false;
  670. }
  671. synchronized(this) {
  672. r = createOutputRow(r, data.outputRowMeta.size());
  673. //获取数据库名和表名
  674. String dbName = "MemberSqlServer";//getInputRowMeta().getString(r, "conname", null );
  675. String tablename = "DataImport_memberterminal";//getInputRowMeta().getString(r, "tablename", null );
  676. String idname = "MemberPhone";//getInputRowMeta().getString(r, "idname", null );
  677. String sourceidname = "termphoneid";//getInputRowMeta().getString(r, "sourceidname", null );
  678. String sourcetablename = "Orders";//getInputRowMeta().getString(r, "sourcetablename", null );
  679. if (dbName==null||tablename==null) {
  680. throw new KettleException("Unable to find field with name "+tablename+" in the input row.");
  681. }
  682. //logBasic("table---"+tablename);
  683. if(database == null){
  684. //数据库连接
  685. DatabaseMeta databaseMeta=null;
  686. try {
  687. databaseMeta = getTransMeta().findDatabase(dbName);
  688. if (databaseMeta==null) {
  689. logError("A connection with name "+dbName+" could not be found!");
  690. setErrors(1);
  691. return false;
  692. }
  693. database = new Database(getTrans(), databaseMeta);
  694. database.connect();
  695. //logBasic("success!");
  696. } catch(Exception e) {
  697. logError("Connecting to database "+dbName+" failed.", e);
  698. setErrors(1);
  699. return false;
  700. }
  701. }
  702. //查询表数据
  703. try {
  704. RowMetaInterface idxRowMeta =data.outputRowMeta;
  705. int i=0;
  706. r = createOutputRow(r, data.outputRowMeta.size());
  707. //int index = getInputRowMeta().size();
  708. // Add the index name
  709. //
  710. String Id = idxRowMeta.getString(r, idname, null);
  711. // Add the column name
  712. String DataId = idxRowMeta.getString(r, sourceidname, null);
  713. /*String sqlSelect = "select Id from "+tablename + " where DataId = '"+ DataId +"'";
  714. ResultSet resultSet = null;
  715. resultSet = database.openQuery(sqlSelect);
  716. Object[] idxRow = database.getRow(resultSet);
  717. if (database!=null) {
  718. database.closeQuery(resultSet);
  719. resultSet = null;
  720. }
  721. //if(idxRow != null){
  722. // return true;
  723. //}
  724. */
  725. //logBasic("idxRow--Id"+Id);
  726. //logBasic("idxRow--sourcetablename"+sourcetablename);
  727. //logBasic("idxRow--DataId"+DataId);
  728. GetRequest getRequest = new GetRequest(
  729. "crm_memberberterminal", // Index
  730. "_doc", // /Type
  731. DataId); // Document id
  732. getRequest.fetchSourceContext(new FetchSourceContext(false)); // 禁用 _source 字段
  733. getRequest.storedFields(new String[]{"_none_"}); // 禁止存储任何字段
  734. boolean exists = client.exists(getRequest,RequestOptions.DEFAULT);
  735. //client.close();
  736. if(exists ){
  737. return true;
  738. }
  739. //if(!exists &amp;&amp; idxRow == null){
  740. // return true;
  741. //}
  742. //3.获得预处理对象
  743. String sql="insert into "+tablename+" values (?,?,?,?);";//begin tran t2; commit tran t2
  744. //logBasic("idxRow--database"+ database);
  745. if(stat == null)
  746. stat = database.prepareSQL(sql);
  747. //logBasic("idxRow--database"+ stat);
  748. //stat.addBatch(sql);
  749. //4.SQL语句占位符设置实际参数
  750. stat.setString(1, Id);//索引参数1代表着sql中的第一个?号,也就是我需要将条件sid所对应的sname数据更新为“儿童玩具测试”
  751. stat.setString(2, sourcetablename);//索引参数2代表着sql中的第二个?号,也就是条件是sid为3
  752. stat.setString(3, DataId);//索引参数2代表着sql中的第二个?号,也就是条件是sid为3
  753. stat.setString(4, "phone1");
  754. //stat.setInt(5, index);
  755. //5.执行SQL语句
  756. boolean line = stat.execute();
  757. //int[] line = stat.executeBatch();
  758. //System.out.println("更新记录数"+ line);
  759. //6.释放资源
  760. //stat.close();
  761. setVariable("index",String.valueOf(index));
  762. //Integer pn = Integer.parseInt(Id);
  763. //Integer curpageNum = Integer.parseInt(Id) % pagesize;
  764. //if(pn > 0 &amp;&amp; curpageNum == 0){
  765. // setVariable("page",String.valueOf(page));
  766. //}
  767. //logBasic("idxRow--getVariable"+getVariable("page"));
  768. //logBasic("idxRow--curpageNum"+curpageNum);
  769. //logBasic("idxRow--length"+i);
  770. }
  771. catch(SQLServerException e) {
  772. return true;
  773. }catch(Exception e) {
  774. throw new KettleException(e);
  775. }
  776. //释放连接
  777. //if (database!=null) {
  778. // database.disconnect();
  779. //}
  780. // Send the row on to the next step.
  781. }
  782. putRow(data.outputRowMeta, r);
  783. return true;
  784. }</class_source>
  785. </definition>
  786. </definitions>
  787. <fields>
  788. </fields>
  789. <clear_result_fields>N</clear_result_fields>
  790. <info_steps/>
  791. <target_steps/>
  792. <usage_parameters/>
  793. <attributes/>
  794. <cluster_schema/>
  795. <remotesteps>
  796. <input>
  797. </input>
  798. <output>
  799. </output>
  800. </remotesteps>
  801. <GUI>
  802. <xloc>224</xloc>
  803. <yloc>80</yloc>
  804. <draw>Y</draw>
  805. </GUI>
  806. </step>
  807. <step>
  808. <name>Java 代码 2</name>
  809. <type>UserDefinedJavaClass</type>
  810. <description/>
  811. <distribute>Y</distribute>
  812. <custom_distribution/>
  813. <copies>10</copies>
  814. <partitioning>
  815. <method>none</method>
  816. <schema_name/>
  817. </partitioning>
  818. <definitions>
  819. <definition>
  820. <class_type>TRANSFORM_CLASS</class_type>
  821. <class_name>Processor</class_name>
  822. <class_source>import java.sql.*;
  823. import org.pentaho.di.core.database.*;
  824. import org.apache.http.HttpHost;
  825. import org.elasticsearch.ElasticsearchException;
  826. import org.elasticsearch.action.get.GetRequest;
  827. import org.elasticsearch.action.get.GetResponse;
  828. import org.elasticsearch.client.RestHighLevelClient;
  829. import org.elasticsearch.client.RequestOptions;
  830. import org.elasticsearch.client.RestClient;
  831. import org.elasticsearch.common.Strings;
  832. import org.elasticsearch.rest.RestStatus;
  833. import org.elasticsearch.search.fetch.subphase.FetchSourceContext;
  834. import org.elasticsearch.action.update.UpdateRequest;
  835. import org.elasticsearch.action.update.UpdateResponse;
  836. import org.elasticsearch.common.xcontent.XContentBuilder;
  837. import org.elasticsearch.common.xcontent.XContentFactory;
  838. import org.elasticsearch.script.Script;
  839. import java.lang.reflect.InvocationTargetException;
  840. import java.lang.reflect.Method;
  841. import com.microsoft.sqlserver.jdbc.SQLServerException;
  842. Database database = null;
  843. PreparedStatement stat = null;
  844. PreparedStatement stat1 = null;
  845. RestHighLevelClient client = new RestHighLevelClient(
  846. RestClient.builder(
  847. new HttpHost[]{new HttpHost("192.168.50.32", 9200, "http")}));
  848. Integer index = 0;
  849. public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException
  850. {
  851. //logBasic("start---");
  852. String type = getVariable("type");
  853. String indexs = getVariable("index");
  854. //if (indexs != null) index = Integer.parseInt(indexs);
  855. Object[] r = getRow();
  856. if (r == null) {
  857. try {
  858. if (stat!=null) {
  859. stat.close();
  860. }
  861. if (stat1!=null) {
  862. stat1.close();
  863. }
  864. if (database!=null) {
  865. database.disconnect();
  866. }
  867. if(client!=null){
  868. client.close();
  869. }
  870. }
  871. catch(Exception e) {
  872. throw new KettleException(e);
  873. }
  874. setOutputDone();
  875. return false;
  876. }
  877. synchronized(this) {
  878. r = createOutputRow(r, data.outputRowMeta.size());
  879. //获取数据库名和表名
  880. String dbName = "MemberSqlServer";//getInputRowMeta().getString(r, "conname", null );
  881. String tablename = "DataImport_memberterminal";//getInputRowMeta().getString(r, "tablename", null );
  882. String idname = "MemberPhone";//getInputRowMeta().getString(r, "idname", null );
  883. String sourceidname = "termphoneid";//getInputRowMeta().getString(r, "sourceidname", null );
  884. String sourcetablename = "Orders";//getInputRowMeta().getString(r, "sourcetablename", null );
  885. if (dbName==null||tablename==null) {
  886. throw new KettleException("Unable to find field with name "+tablename+" in the input row.");
  887. }
  888. //logBasic("table---"+tablename);
  889. if(database == null){
  890. //数据库连接
  891. DatabaseMeta databaseMeta=null;
  892. try {
  893. databaseMeta = getTransMeta().findDatabase(dbName);
  894. if (databaseMeta==null) {
  895. logError("A connection with name "+dbName+" could not be found!");
  896. setErrors(1);
  897. return false;
  898. }
  899. database = new Database(getTrans(), databaseMeta);
  900. database.connect();
  901. //logBasic("success!");
  902. } catch(Exception e) {
  903. logError("Connecting to database "+dbName+" failed.", e);
  904. setErrors(1);
  905. return false;
  906. }
  907. }
  908. //查询表数据
  909. try {
  910. RowMetaInterface idxRowMeta =data.outputRowMeta;
  911. int i=0;
  912. r = createOutputRow(r, data.outputRowMeta.size());
  913. //int index = getInputRowMeta().size();
  914. // Add the index name
  915. //
  916. String Id = idxRowMeta.getString(r, idname, null);
  917. // Add the column name
  918. String DataId = idxRowMeta.getString(r, sourceidname, null);
  919. /*String sqlSelect = "select Id from "+tablename + " where DataId = '"+ DataId +"'";
  920. ResultSet resultSet = null;
  921. resultSet = database.openQuery(sqlSelect);
  922. Object[] idxRow = database.getRow(resultSet);
  923. if (database!=null) {
  924. database.closeQuery(resultSet);
  925. resultSet = null;
  926. }
  927. //if(idxRow != null){
  928. // return true;
  929. //}
  930. */
  931. //logBasic("idxRow--Id"+Id);
  932. //logBasic("idxRow--sourcetablename"+sourcetablename);
  933. //logBasic("idxRow--DataId"+DataId);
  934. GetRequest getRequest = new GetRequest(
  935. "crm_memberberterminal", // Index
  936. "_doc", // /Type
  937. DataId); // Document id
  938. getRequest.fetchSourceContext(new FetchSourceContext(false)); // 禁用 _source 字段
  939. getRequest.storedFields(new String[]{"_none_"}); // 禁止存储任何字段
  940. boolean exists = client.exists(getRequest,RequestOptions.DEFAULT);
  941. //client.close();
  942. if(exists ){
  943. return true;
  944. }
  945. //if(!exists &amp;&amp; idxRow == null){
  946. // return true;
  947. //}
  948. //3.获得预处理对象
  949. String sql="insert into "+tablename+" values (?,?,?,?);";//begin tran t2; commit tran t2
  950. //logBasic("idxRow--database"+ database);
  951. if(stat == null)
  952. stat = database.prepareSQL(sql);
  953. //logBasic("idxRow--database"+ stat);
  954. //stat.addBatch(sql);
  955. //4.SQL语句占位符设置实际参数
  956. stat.setString(1, Id);//索引参数1代表着sql中的第一个?号,也就是我需要将条件sid所对应的sname数据更新为“儿童玩具测试”
  957. stat.setString(2, sourcetablename);//索引参数2代表着sql中的第二个?号,也就是条件是sid为3
  958. stat.setString(3, DataId);//索引参数2代表着sql中的第二个?号,也就是条件是sid为3
  959. stat.setString(4, "phone2");
  960. //stat.setInt(5, index);
  961. //5.执行SQL语句
  962. boolean line = stat.execute();
  963. //int[] line = stat.executeBatch();
  964. //System.out.println("更新记录数"+ line);
  965. //6.释放资源
  966. //stat.close();
  967. setVariable("index",String.valueOf(index));
  968. //Integer pn = Integer.parseInt(Id);
  969. //Integer curpageNum = Integer.parseInt(Id) % pagesize;
  970. //if(pn > 0 &amp;&amp; curpageNum == 0){
  971. // setVariable("page",String.valueOf(page));
  972. //}
  973. //logBasic("idxRow--getVariable"+getVariable("page"));
  974. //logBasic("idxRow--curpageNum"+curpageNum);
  975. //logBasic("idxRow--length"+i);
  976. }
  977. catch(SQLServerException e) {
  978. return true;
  979. }catch(Exception e) {
  980. throw new KettleException(e);
  981. }
  982. //释放连接
  983. //if (database!=null) {
  984. // database.disconnect();
  985. //}
  986. // Send the row on to the next step.
  987. }
  988. putRow(data.outputRowMeta, r);
  989. return true;
  990. }</class_source>
  991. </definition>
  992. </definitions>
  993. <fields>
  994. </fields>
  995. <clear_result_fields>N</clear_result_fields>
  996. <info_steps/>
  997. <target_steps/>
  998. <usage_parameters/>
  999. <attributes/>
  1000. <cluster_schema/>
  1001. <remotesteps>
  1002. <input>
  1003. </input>
  1004. <output>
  1005. </output>
  1006. </remotesteps>
  1007. <GUI>
  1008. <xloc>224</xloc>
  1009. <yloc>160</yloc>
  1010. <draw>Y</draw>
  1011. </GUI>
  1012. </step>
  1013. <step>
  1014. <name>Java 代码 3</name>
  1015. <type>UserDefinedJavaClass</type>
  1016. <description/>
  1017. <distribute>Y</distribute>
  1018. <custom_distribution/>
  1019. <copies>10</copies>
  1020. <partitioning>
  1021. <method>none</method>
  1022. <schema_name/>
  1023. </partitioning>
  1024. <definitions>
  1025. <definition>
  1026. <class_type>TRANSFORM_CLASS</class_type>
  1027. <class_name>Processor</class_name>
  1028. <class_source>import java.sql.*;
  1029. import org.pentaho.di.core.database.*;
  1030. import org.apache.http.HttpHost;
  1031. import org.elasticsearch.ElasticsearchException;
  1032. import org.elasticsearch.action.get.GetRequest;
  1033. import org.elasticsearch.action.get.GetResponse;
  1034. import org.elasticsearch.client.RestHighLevelClient;
  1035. import org.elasticsearch.client.RequestOptions;
  1036. import org.elasticsearch.client.RestClient;
  1037. import org.elasticsearch.common.Strings;
  1038. import org.elasticsearch.rest.RestStatus;
  1039. import org.elasticsearch.search.fetch.subphase.FetchSourceContext;
  1040. import org.elasticsearch.action.update.UpdateRequest;
  1041. import org.elasticsearch.action.update.UpdateResponse;
  1042. import org.elasticsearch.common.xcontent.XContentBuilder;
  1043. import org.elasticsearch.common.xcontent.XContentFactory;
  1044. import org.elasticsearch.script.Script;
  1045. import java.lang.reflect.InvocationTargetException;
  1046. import java.lang.reflect.Method;
  1047. import com.microsoft.sqlserver.jdbc.SQLServerException;
  1048. Database database = null;
  1049. PreparedStatement stat = null;
  1050. PreparedStatement stat1 = null;
  1051. RestHighLevelClient client = new RestHighLevelClient(
  1052. RestClient.builder(
  1053. new HttpHost[]{new HttpHost("192.168.50.32", 9200, "http")}));
  1054. Integer index = 0;
  1055. public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException
  1056. {
  1057. //logBasic("start---");
  1058. String type = getVariable("type");
  1059. String indexs = getVariable("index");
  1060. //if (indexs != null) index = Integer.parseInt(indexs);
  1061. Object[] r = getRow();
  1062. if (r == null) {
  1063. try {
  1064. if (stat!=null) {
  1065. stat.close();
  1066. }
  1067. if (stat1!=null) {
  1068. stat1.close();
  1069. }
  1070. if (database!=null) {
  1071. database.disconnect();
  1072. }
  1073. if(client!=null){
  1074. client.close();
  1075. }
  1076. }
  1077. catch(Exception e) {
  1078. throw new KettleException(e);
  1079. }
  1080. setOutputDone();
  1081. return false;
  1082. }
  1083. synchronized(this) {
  1084. r = createOutputRow(r, data.outputRowMeta.size());
  1085. //获取数据库名和表名
  1086. String dbName = "MemberSqlServer";//getInputRowMeta().getString(r, "conname", null );
  1087. String tablename = "DataImport_memberterminal";//getInputRowMeta().getString(r, "tablename", null );
  1088. String idname = "MemberPhone";//getInputRowMeta().getString(r, "idname", null );
  1089. String sourceidname = "termphoneid";//getInputRowMeta().getString(r, "sourceidname", null );
  1090. String sourcetablename = "Orders";//getInputRowMeta().getString(r, "sourcetablename", null );
  1091. if (dbName==null||tablename==null) {
  1092. throw new KettleException("Unable to find field with name "+tablename+" in the input row.");
  1093. }
  1094. //logBasic("table---"+tablename);
  1095. if(database == null){
  1096. //数据库连接
  1097. DatabaseMeta databaseMeta=null;
  1098. try {
  1099. databaseMeta = getTransMeta().findDatabase(dbName);
  1100. if (databaseMeta==null) {
  1101. logError("A connection with name "+dbName+" could not be found!");
  1102. setErrors(1);
  1103. return false;
  1104. }
  1105. database = new Database(getTrans(), databaseMeta);
  1106. database.connect();
  1107. //logBasic("success!");
  1108. } catch(Exception e) {
  1109. logError("Connecting to database "+dbName+" failed.", e);
  1110. setErrors(1);
  1111. return false;
  1112. }
  1113. }
  1114. //查询表数据
  1115. try {
  1116. RowMetaInterface idxRowMeta =data.outputRowMeta;
  1117. int i=0;
  1118. r = createOutputRow(r, data.outputRowMeta.size());
  1119. //int index = getInputRowMeta().size();
  1120. // Add the index name
  1121. //
  1122. String Id = idxRowMeta.getString(r, idname, null);
  1123. // Add the column name
  1124. String DataId = idxRowMeta.getString(r, sourceidname, null);
  1125. /*String sqlSelect = "select Id from "+tablename + " where DataId = '"+ DataId +"'";
  1126. ResultSet resultSet = null;
  1127. resultSet = database.openQuery(sqlSelect);
  1128. Object[] idxRow = database.getRow(resultSet);
  1129. if (database!=null) {
  1130. database.closeQuery(resultSet);
  1131. resultSet = null;
  1132. }
  1133. //if(idxRow != null){
  1134. // return true;
  1135. //}
  1136. */
  1137. //logBasic("idxRow--Id"+Id);
  1138. //logBasic("idxRow--sourcetablename"+sourcetablename);
  1139. //logBasic("idxRow--DataId"+DataId);
  1140. GetRequest getRequest = new GetRequest(
  1141. "crm_memberberterminal", // Index
  1142. "_doc", // /Type
  1143. DataId); // Document id
  1144. getRequest.fetchSourceContext(new FetchSourceContext(false)); // 禁用 _source 字段
  1145. getRequest.storedFields(new String[]{"_none_"}); // 禁止存储任何字段
  1146. boolean exists = client.exists(getRequest,RequestOptions.DEFAULT);
  1147. //client.close();
  1148. if(exists ){
  1149. return true;
  1150. }
  1151. //if(!exists &amp;&amp; idxRow == null){
  1152. // return true;
  1153. //}
  1154. //3.获得预处理对象
  1155. String sql="insert into "+tablename+" values (?,?,?,?);";//begin tran t2; commit tran t2
  1156. //logBasic("idxRow--database"+ database);
  1157. if(stat == null)
  1158. stat = database.prepareSQL(sql);
  1159. //logBasic("idxRow--database"+ stat);
  1160. //stat.addBatch(sql);
  1161. //4.SQL语句占位符设置实际参数
  1162. stat.setString(1, Id);//索引参数1代表着sql中的第一个?号,也就是我需要将条件sid所对应的sname数据更新为“儿童玩具测试”
  1163. stat.setString(2, sourcetablename);//索引参数2代表着sql中的第二个?号,也就是条件是sid为3
  1164. stat.setString(3, DataId);//索引参数2代表着sql中的第二个?号,也就是条件是sid为3
  1165. stat.setString(4, "phone3");
  1166. //5.执行SQL语句
  1167. boolean line = stat.execute();
  1168. //int[] line = stat.executeBatch();
  1169. //System.out.println("更新记录数"+ line);
  1170. //6.释放资源
  1171. //stat.close();
  1172. setVariable("index",String.valueOf(index));
  1173. //Integer pn = Integer.parseInt(Id);
  1174. //Integer curpageNum = Integer.parseInt(Id) % pagesize;
  1175. //if(pn > 0 &amp;&amp; curpageNum == 0){
  1176. // setVariable("page",String.valueOf(page));
  1177. //}
  1178. //logBasic("idxRow--getVariable"+getVariable("page"));
  1179. //logBasic("idxRow--curpageNum"+curpageNum);
  1180. //logBasic("idxRow--length"+i);
  1181. }
  1182. catch(SQLServerException e) {
  1183. return true;
  1184. }catch(Exception e) {
  1185. throw new KettleException(e);
  1186. }
  1187. //释放连接
  1188. //if (database!=null) {
  1189. // database.disconnect();
  1190. //}
  1191. // Send the row on to the next step.
  1192. }
  1193. putRow(data.outputRowMeta, r);
  1194. return true;
  1195. }</class_source>
  1196. </definition>
  1197. </definitions>
  1198. <fields>
  1199. </fields>
  1200. <clear_result_fields>N</clear_result_fields>
  1201. <info_steps/>
  1202. <target_steps/>
  1203. <usage_parameters/>
  1204. <attributes/>
  1205. <cluster_schema/>
  1206. <remotesteps>
  1207. <input>
  1208. </input>
  1209. <output>
  1210. </output>
  1211. </remotesteps>
  1212. <GUI>
  1213. <xloc>240</xloc>
  1214. <yloc>240</yloc>
  1215. <draw>Y</draw>
  1216. </GUI>
  1217. </step>
  1218. <step>
  1219. <name>terminaldoc表输入</name>
  1220. <type>TableInput</type>
  1221. <description/>
  1222. <distribute>Y</distribute>
  1223. <custom_distribution/>
  1224. <copies>1</copies>
  1225. <partitioning>
  1226. <method>none</method>
  1227. <schema_name/>
  1228. </partitioning>
  1229. <connection>MallSqlserver</connection>
  1230. <sql>select
  1231. concat(OriginType,'_',dbo.DesDecryptFixKey('123456','123456e10adc3949ba59abbe56e057f20f883e',AConsigneePhone1)) as termphoneid
  1232. ,OriginType as TerminalCode
  1233. ,BuyUserId as MemberId
  1234. ,dbo.DesDecryptFixKey('123456','123456e10adc3949ba59abbe56e057f20f883e',AConsigneePhone1) as MemberPhone
  1235. ,SourcePlatforms as MemSourcePlatforms
  1236. ,DeviceType as MemDeviceType
  1237. ,OrdersCode
  1238. from Orders
  1239. where AConsigneePhone1 !='' and AConsigneePhone1!= AConsigneePhone2 and AConsigneePhone1!=AConsigneePhone3</sql>
  1240. <limit>0</limit>
  1241. <lookup/>
  1242. <execute_each_row>N</execute_each_row>
  1243. <variables_active>N</variables_active>
  1244. <lazy_conversion_active>N</lazy_conversion_active>
  1245. <attributes/>
  1246. <cluster_schema/>
  1247. <remotesteps>
  1248. <input>
  1249. </input>
  1250. <output>
  1251. </output>
  1252. </remotesteps>
  1253. <GUI>
  1254. <xloc>128</xloc>
  1255. <yloc>112</yloc>
  1256. <draw>Y</draw>
  1257. </GUI>
  1258. </step>
  1259. <step>
  1260. <name>terminaldoc表输入 2</name>
  1261. <type>TableInput</type>
  1262. <description/>
  1263. <distribute>Y</distribute>
  1264. <custom_distribution/>
  1265. <copies>1</copies>
  1266. <partitioning>
  1267. <method>none</method>
  1268. <schema_name/>
  1269. </partitioning>
  1270. <connection>MallSqlserver</connection>
  1271. <sql>select
  1272. concat(OriginType,'_',dbo.DesDecryptFixKey('123456','123456e10adc3949ba59abbe56e057f20f883e',AConsigneePhone2)) as termphoneid
  1273. ,OriginType as TerminalCode
  1274. ,BuyUserId as MemberId
  1275. ,dbo.DesDecryptFixKey('123456','123456e10adc3949ba59abbe56e057f20f883e',AConsigneePhone2) as MemberPhone
  1276. ,SourcePlatforms as MemSourcePlatforms
  1277. ,DeviceType as MemDeviceType
  1278. ,OrdersCode
  1279. from Orders
  1280. where AConsigneePhone2 !='' and AConsigneePhone2!=AConsigneePhone1 and AConsigneePhone2!=AConsigneePhone3</sql>
  1281. <limit>0</limit>
  1282. <lookup/>
  1283. <execute_each_row>N</execute_each_row>
  1284. <variables_active>N</variables_active>
  1285. <lazy_conversion_active>N</lazy_conversion_active>
  1286. <attributes/>
  1287. <cluster_schema/>
  1288. <remotesteps>
  1289. <input>
  1290. </input>
  1291. <output>
  1292. </output>
  1293. </remotesteps>
  1294. <GUI>
  1295. <xloc>112</xloc>
  1296. <yloc>176</yloc>
  1297. <draw>Y</draw>
  1298. </GUI>
  1299. </step>
  1300. <step>
  1301. <name>terminaldoc表输入 3</name>
  1302. <type>TableInput</type>
  1303. <description/>
  1304. <distribute>Y</distribute>
  1305. <custom_distribution/>
  1306. <copies>1</copies>
  1307. <partitioning>
  1308. <method>none</method>
  1309. <schema_name/>
  1310. </partitioning>
  1311. <connection>MallSqlserver</connection>
  1312. <sql>select
  1313. concat(OriginType,'_',dbo.DesDecryptFixKey('123456','123456e10adc3949ba59abbe56e057f20f883e',AConsigneePhone3)) as termphoneid
  1314. ,OriginType as TerminalCode
  1315. ,BuyUserId as MemberId
  1316. ,dbo.DesDecryptFixKey('123456','123456e10adc3949ba59abbe56e057f20f883e',AConsigneePhone3) as MemberPhone
  1317. ,SourcePlatforms as MemSourcePlatforms
  1318. ,DeviceType as MemDeviceType
  1319. ,OrdersCode
  1320. from Orders
  1321. where AConsigneePhone3 !='' and AConsigneePhone3!=AConsigneePhone2 and AConsigneePhone3 != AConsigneePhone1</sql>
  1322. <limit>0</limit>
  1323. <lookup/>
  1324. <execute_each_row>N</execute_each_row>
  1325. <variables_active>N</variables_active>
  1326. <lazy_conversion_active>N</lazy_conversion_active>
  1327. <attributes/>
  1328. <cluster_schema/>
  1329. <remotesteps>
  1330. <input>
  1331. </input>
  1332. <output>
  1333. </output>
  1334. </remotesteps>
  1335. <GUI>
  1336. <xloc>128</xloc>
  1337. <yloc>240</yloc>
  1338. <draw>Y</draw>
  1339. </GUI>
  1340. </step>
  1341. <step_error_handling>
  1342. </step_error_handling>
  1343. <slave-step-copy-partition-distribution>
  1344. </slave-step-copy-partition-distribution>
  1345. <slave_transformation>N</slave_transformation>
  1346. <attributes/>
  1347. </transformation>