当前位置:   article > 正文

kettle学习总结(1)

kettle

1,kettle下载

        kettle本身是Java开发的开源项目,由于某种原因,目前官网已经不支持下载了,可到我的CSDN中下载

        下载完后,还需要安装JDK环境以及对应的数据库驱动包,需要注意的是 该kettle的版本较低,如果你是用的 mysql数据库,需要下载 5.4.7以下的驱动包,下载地址参照以下:

MySQL :: Download Connector/J

2,一切准备就绪后就可以开始使用啦

假设现在有一个场景:需要将本地的所有库同步到目标服务器上对应的数据库中

其中涉及到 数据表的自动创建 以及 数据的自动同步,这里以全量同步为例。

实现步骤分为三大块:定义一个入口 任务,该任务中涵盖 start、库表初始化(删除表及数据)、全量同步、结束

3,main 任务脚本内容

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <job>
  3. <name>main</name>
  4. <description />
  5. <extended_description />
  6. <job_version />
  7. <directory>/</directory>
  8. <created_user>-</created_user>
  9. <created_date>2024/06/03 09:54:18.592</created_date>
  10. <modified_user>-</modified_user>
  11. <modified_date>2024/06/03 09:54:18.592</modified_date>
  12. <parameters>
  13. </parameters>
  14. <slaveservers>
  15. </slaveservers>
  16. <job-log-table>
  17. <connection />
  18. <schema />
  19. <table />
  20. <size_limit_lines />
  21. <interval />
  22. <timeout_days />
  23. <field>
  24. <id>ID_JOB</id>
  25. <enabled>Y</enabled>
  26. <name>ID_JOB</name>
  27. </field>
  28. <field>
  29. <id>CHANNEL_ID</id>
  30. <enabled>Y</enabled>
  31. <name>CHANNEL_ID</name>
  32. </field>
  33. <field>
  34. <id>JOBNAME</id>
  35. <enabled>Y</enabled>
  36. <name>JOBNAME</name>
  37. </field>
  38. <field>
  39. <id>STATUS</id>
  40. <enabled>Y</enabled>
  41. <name>STATUS</name>
  42. </field>
  43. <field>
  44. <id>LINES_READ</id>
  45. <enabled>Y</enabled>
  46. <name>LINES_READ</name>
  47. </field>
  48. <field>
  49. <id>LINES_WRITTEN</id>
  50. <enabled>Y</enabled>
  51. <name>LINES_WRITTEN</name>
  52. </field>
  53. <field>
  54. <id>LINES_UPDATED</id>
  55. <enabled>Y</enabled>
  56. <name>LINES_UPDATED</name>
  57. </field>
  58. <field>
  59. <id>LINES_INPUT</id>
  60. <enabled>Y</enabled>
  61. <name>LINES_INPUT</name>
  62. </field>
  63. <field>
  64. <id>LINES_OUTPUT</id>
  65. <enabled>Y</enabled>
  66. <name>LINES_OUTPUT</name>
  67. </field>
  68. <field>
  69. <id>LINES_REJECTED</id>
  70. <enabled>Y</enabled>
  71. <name>LINES_REJECTED</name>
  72. </field>
  73. <field>
  74. <id>ERRORS</id>
  75. <enabled>Y</enabled>
  76. <name>ERRORS</name>
  77. </field>
  78. <field>
  79. <id>STARTDATE</id>
  80. <enabled>Y</enabled>
  81. <name>STARTDATE</name>
  82. </field>
  83. <field>
  84. <id>ENDDATE</id>
  85. <enabled>Y</enabled>
  86. <name>ENDDATE</name>
  87. </field>
  88. <field>
  89. <id>LOGDATE</id>
  90. <enabled>Y</enabled>
  91. <name>LOGDATE</name>
  92. </field>
  93. <field>
  94. <id>DEPDATE</id>
  95. <enabled>Y</enabled>
  96. <name>DEPDATE</name>
  97. </field>
  98. <field>
  99. <id>REPLAYDATE</id>
  100. <enabled>Y</enabled>
  101. <name>REPLAYDATE</name>
  102. </field>
  103. <field>
  104. <id>LOG_FIELD</id>
  105. <enabled>Y</enabled>
  106. <name>LOG_FIELD</name>
  107. </field>
  108. <field>
  109. <id>EXECUTING_SERVER</id>
  110. <enabled>N</enabled>
  111. <name>EXECUTING_SERVER</name>
  112. </field>
  113. <field>
  114. <id>EXECUTING_USER</id>
  115. <enabled>N</enabled>
  116. <name>EXECUTING_USER</name>
  117. </field>
  118. <field>
  119. <id>START_JOB_ENTRY</id>
  120. <enabled>N</enabled>
  121. <name>START_JOB_ENTRY</name>
  122. </field>
  123. <field>
  124. <id>CLIENT</id>
  125. <enabled>N</enabled>
  126. <name>CLIENT</name>
  127. </field>
  128. </job-log-table>
  129. <jobentry-log-table>
  130. <connection />
  131. <schema />
  132. <table />
  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>CHANNEL_ID</id>
  141. <enabled>Y</enabled>
  142. <name>CHANNEL_ID</name>
  143. </field>
  144. <field>
  145. <id>LOG_DATE</id>
  146. <enabled>Y</enabled>
  147. <name>LOG_DATE</name>
  148. </field>
  149. <field>
  150. <id>JOBNAME</id>
  151. <enabled>Y</enabled>
  152. <name>TRANSNAME</name>
  153. </field>
  154. <field>
  155. <id>JOBENTRYNAME</id>
  156. <enabled>Y</enabled>
  157. <name>STEPNAME</name>
  158. </field>
  159. <field>
  160. <id>LINES_READ</id>
  161. <enabled>Y</enabled>
  162. <name>LINES_READ</name>
  163. </field>
  164. <field>
  165. <id>LINES_WRITTEN</id>
  166. <enabled>Y</enabled>
  167. <name>LINES_WRITTEN</name>
  168. </field>
  169. <field>
  170. <id>LINES_UPDATED</id>
  171. <enabled>Y</enabled>
  172. <name>LINES_UPDATED</name>
  173. </field>
  174. <field>
  175. <id>LINES_INPUT</id>
  176. <enabled>Y</enabled>
  177. <name>LINES_INPUT</name>
  178. </field>
  179. <field>
  180. <id>LINES_OUTPUT</id>
  181. <enabled>Y</enabled>
  182. <name>LINES_OUTPUT</name>
  183. </field>
  184. <field>
  185. <id>LINES_REJECTED</id>
  186. <enabled>Y</enabled>
  187. <name>LINES_REJECTED</name>
  188. </field>
  189. <field>
  190. <id>ERRORS</id>
  191. <enabled>Y</enabled>
  192. <name>ERRORS</name>
  193. </field>
  194. <field>
  195. <id>RESULT</id>
  196. <enabled>Y</enabled>
  197. <name>RESULT</name>
  198. </field>
  199. <field>
  200. <id>NR_RESULT_ROWS</id>
  201. <enabled>Y</enabled>
  202. <name>NR_RESULT_ROWS</name>
  203. </field>
  204. <field>
  205. <id>NR_RESULT_FILES</id>
  206. <enabled>Y</enabled>
  207. <name>NR_RESULT_FILES</name>
  208. </field>
  209. <field>
  210. <id>LOG_FIELD</id>
  211. <enabled>N</enabled>
  212. <name>LOG_FIELD</name>
  213. </field>
  214. <field>
  215. <id>COPY_NR</id>
  216. <enabled>N</enabled>
  217. <name>COPY_NR</name>
  218. </field>
  219. </jobentry-log-table>
  220. <channel-log-table>
  221. <connection />
  222. <schema />
  223. <table />
  224. <timeout_days />
  225. <field>
  226. <id>ID_BATCH</id>
  227. <enabled>Y</enabled>
  228. <name>ID_BATCH</name>
  229. </field>
  230. <field>
  231. <id>CHANNEL_ID</id>
  232. <enabled>Y</enabled>
  233. <name>CHANNEL_ID</name>
  234. </field>
  235. <field>
  236. <id>LOG_DATE</id>
  237. <enabled>Y</enabled>
  238. <name>LOG_DATE</name>
  239. </field>
  240. <field>
  241. <id>LOGGING_OBJECT_TYPE</id>
  242. <enabled>Y</enabled>
  243. <name>LOGGING_OBJECT_TYPE</name>
  244. </field>
  245. <field>
  246. <id>OBJECT_NAME</id>
  247. <enabled>Y</enabled>
  248. <name>OBJECT_NAME</name>
  249. </field>
  250. <field>
  251. <id>OBJECT_COPY</id>
  252. <enabled>Y</enabled>
  253. <name>OBJECT_COPY</name>
  254. </field>
  255. <field>
  256. <id>REPOSITORY_DIRECTORY</id>
  257. <enabled>Y</enabled>
  258. <name>REPOSITORY_DIRECTORY</name>
  259. </field>
  260. <field>
  261. <id>FILENAME</id>
  262. <enabled>Y</enabled>
  263. <name>FILENAME</name>
  264. </field>
  265. <field>
  266. <id>OBJECT_ID</id>
  267. <enabled>Y</enabled>
  268. <name>OBJECT_ID</name>
  269. </field>
  270. <field>
  271. <id>OBJECT_REVISION</id>
  272. <enabled>Y</enabled>
  273. <name>OBJECT_REVISION</name>
  274. </field>
  275. <field>
  276. <id>PARENT_CHANNEL_ID</id>
  277. <enabled>Y</enabled>
  278. <name>PARENT_CHANNEL_ID</name>
  279. </field>
  280. <field>
  281. <id>ROOT_CHANNEL_ID</id>
  282. <enabled>Y</enabled>
  283. <name>ROOT_CHANNEL_ID</name>
  284. </field>
  285. </channel-log-table>
  286. <pass_batchid>N</pass_batchid>
  287. <shared_objects_file />
  288. <entries>
  289. <entry>
  290. <name>START</name>
  291. <description />
  292. <type>SPECIAL</type>
  293. <start>Y</start>
  294. <dummy>N</dummy>
  295. <repeat>N</repeat>
  296. <schedulerType>0</schedulerType>
  297. <intervalSeconds>0</intervalSeconds>
  298. <intervalMinutes>60</intervalMinutes>
  299. <hour>12</hour>
  300. <minutes>0</minutes>
  301. <weekDay>1</weekDay>
  302. <DayOfMonth>1</DayOfMonth>
  303. <parallel>N</parallel>
  304. <draw>Y</draw>
  305. <nr>0</nr>
  306. <xloc>176</xloc>
  307. <yloc>208</yloc>
  308. </entry>
  309. <entry>
  310. <name>同步aav</name>
  311. <description />
  312. <type>TRANS</type>
  313. <specification_method>filename</specification_method>
  314. <trans_object_id />
  315. <filename>${Internal.Entry.Current.Directory}/sync_aav.ktr</filename>
  316. <transname />
  317. <arg_from_previous>N</arg_from_previous>
  318. <params_from_previous>N</params_from_previous>
  319. <exec_per_row>N</exec_per_row>
  320. <clear_rows>N</clear_rows>
  321. <clear_files>N</clear_files>
  322. <set_logfile>N</set_logfile>
  323. <logfile />
  324. <logext />
  325. <add_date>N</add_date>
  326. <add_time>N</add_time>
  327. <loglevel>Basic</loglevel>
  328. <cluster>N</cluster>
  329. <slave_server_name />
  330. <set_append_logfile>N</set_append_logfile>
  331. <wait_until_finished>Y</wait_until_finished>
  332. <follow_abort_remote>N</follow_abort_remote>
  333. <create_parent_folder>N</create_parent_folder>
  334. <logging_remote_work>N</logging_remote_work>
  335. <run_configuration>Pentaho local</run_configuration>
  336. <parameters>
  337. <pass_all_parameters>Y</pass_all_parameters>
  338. </parameters>
  339. <parallel>N</parallel>
  340. <draw>Y</draw>
  341. <nr>0</nr>
  342. <xloc>640</xloc>
  343. <yloc>48</yloc>
  344. </entry>
  345. <entry>
  346. <name>初始化所有表</name>
  347. <description />
  348. <type>JOB</type>
  349. <specification_method>filename</specification_method>
  350. <job_object_id />
  351. <filename>${Internal.Entry.Current.Directory}/init.kjb</filename>
  352. <jobname />
  353. <arg_from_previous>N</arg_from_previous>
  354. <params_from_previous>N</params_from_previous>
  355. <exec_per_row>N</exec_per_row>
  356. <set_logfile>N</set_logfile>
  357. <logfile />
  358. <logext />
  359. <add_date>N</add_date>
  360. <add_time>N</add_time>
  361. <loglevel>Nothing</loglevel>
  362. <slave_server_name />
  363. <wait_until_finished>Y</wait_until_finished>
  364. <follow_abort_remote>N</follow_abort_remote>
  365. <expand_remote_job>N</expand_remote_job>
  366. <create_parent_folder>N</create_parent_folder>
  367. <pass_export>N</pass_export>
  368. <parameters>
  369. <pass_all_parameters>Y</pass_all_parameters>
  370. </parameters>
  371. <set_append_logfile>N</set_append_logfile>
  372. <parallel>N</parallel>
  373. <draw>Y</draw>
  374. <nr>0</nr>
  375. <xloc>352</xloc>
  376. <yloc>208</yloc>
  377. </entry>
  378. <entry>
  379. <name>DUMMY</name>
  380. <description />
  381. <type>SPECIAL</type>
  382. <start>N</start>
  383. <dummy>Y</dummy>
  384. <repeat>N</repeat>
  385. <schedulerType>0</schedulerType>
  386. <intervalSeconds>0</intervalSeconds>
  387. <intervalMinutes>60</intervalMinutes>
  388. <hour>12</hour>
  389. <minutes>0</minutes>
  390. <weekDay>1</weekDay>
  391. <DayOfMonth>1</DayOfMonth>
  392. <parallel>N</parallel>
  393. <draw>Y</draw>
  394. <nr>0</nr>
  395. <xloc>928</xloc>
  396. <yloc>208</yloc>
  397. </entry>
  398. <entry>
  399. <name>同步aps</name>
  400. <description />
  401. <type>TRANS</type>
  402. <specification_method>filename</specification_method>
  403. <trans_object_id />
  404. <filename>${Internal.Entry.Current.Directory}/sync_aps.ktr</filename>
  405. <transname />
  406. <arg_from_previous>N</arg_from_previous>
  407. <params_from_previous>N</params_from_previous>
  408. <exec_per_row>N</exec_per_row>
  409. <clear_rows>N</clear_rows>
  410. <clear_files>N</clear_files>
  411. <set_logfile>N</set_logfile>
  412. <logfile />
  413. <logext />
  414. <add_date>N</add_date>
  415. <add_time>N</add_time>
  416. <loglevel>Basic</loglevel>
  417. <cluster>N</cluster>
  418. <slave_server_name />
  419. <set_append_logfile>N</set_append_logfile>
  420. <wait_until_finished>Y</wait_until_finished>
  421. <follow_abort_remote>N</follow_abort_remote>
  422. <create_parent_folder>N</create_parent_folder>
  423. <logging_remote_work>N</logging_remote_work>
  424. <run_configuration>Pentaho local</run_configuration>
  425. <parameters>
  426. <pass_all_parameters>Y</pass_all_parameters>
  427. </parameters>
  428. <parallel>N</parallel>
  429. <draw>Y</draw>
  430. <nr>0</nr>
  431. <xloc>640</xloc>
  432. <yloc>128</yloc>
  433. </entry>
  434. <entry>
  435. <name>同步douban</name>
  436. <description />
  437. <type>TRANS</type>
  438. <specification_method>filename</specification_method>
  439. <trans_object_id />
  440. <filename>${Internal.Entry.Current.Directory}/sync_douban.ktr</filename>
  441. <transname />
  442. <arg_from_previous>N</arg_from_previous>
  443. <params_from_previous>N</params_from_previous>
  444. <exec_per_row>N</exec_per_row>
  445. <clear_rows>N</clear_rows>
  446. <clear_files>N</clear_files>
  447. <set_logfile>N</set_logfile>
  448. <logfile />
  449. <logext />
  450. <add_date>N</add_date>
  451. <add_time>N</add_time>
  452. <loglevel>Basic</loglevel>
  453. <cluster>N</cluster>
  454. <slave_server_name />
  455. <set_append_logfile>N</set_append_logfile>
  456. <wait_until_finished>Y</wait_until_finished>
  457. <follow_abort_remote>N</follow_abort_remote>
  458. <create_parent_folder>N</create_parent_folder>
  459. <logging_remote_work>N</logging_remote_work>
  460. <run_configuration>Pentaho local</run_configuration>
  461. <parameters>
  462. <pass_all_parameters>Y</pass_all_parameters>
  463. </parameters>
  464. <parallel>N</parallel>
  465. <draw>Y</draw>
  466. <nr>0</nr>
  467. <xloc>640</xloc>
  468. <yloc>208</yloc>
  469. </entry>
  470. <entry>
  471. <name>同步sp-dev</name>
  472. <description />
  473. <type>TRANS</type>
  474. <specification_method>filename</specification_method>
  475. <trans_object_id />
  476. <filename>${Internal.Entry.Current.Directory}/sync_sp-dev.ktr</filename>
  477. <transname />
  478. <arg_from_previous>N</arg_from_previous>
  479. <params_from_previous>N</params_from_previous>
  480. <exec_per_row>N</exec_per_row>
  481. <clear_rows>N</clear_rows>
  482. <clear_files>N</clear_files>
  483. <set_logfile>N</set_logfile>
  484. <logfile />
  485. <logext />
  486. <add_date>N</add_date>
  487. <add_time>N</add_time>
  488. <loglevel>Basic</loglevel>
  489. <cluster>N</cluster>
  490. <slave_server_name />
  491. <set_append_logfile>N</set_append_logfile>
  492. <wait_until_finished>Y</wait_until_finished>
  493. <follow_abort_remote>N</follow_abort_remote>
  494. <create_parent_folder>N</create_parent_folder>
  495. <logging_remote_work>N</logging_remote_work>
  496. <run_configuration>Pentaho local</run_configuration>
  497. <parameters>
  498. <pass_all_parameters>Y</pass_all_parameters>
  499. </parameters>
  500. <parallel>N</parallel>
  501. <draw>Y</draw>
  502. <nr>0</nr>
  503. <xloc>640</xloc>
  504. <yloc>368</yloc>
  505. </entry>
  506. <entry>
  507. <name>同步lottery</name>
  508. <description />
  509. <type>TRANS</type>
  510. <specification_method>filename</specification_method>
  511. <trans_object_id />
  512. <filename>${Internal.Entry.Current.Directory}/sync_lottery.ktr</filename>
  513. <transname />
  514. <arg_from_previous>N</arg_from_previous>
  515. <params_from_previous>N</params_from_previous>
  516. <exec_per_row>N</exec_per_row>
  517. <clear_rows>N</clear_rows>
  518. <clear_files>N</clear_files>
  519. <set_logfile>N</set_logfile>
  520. <logfile />
  521. <logext />
  522. <add_date>N</add_date>
  523. <add_time>N</add_time>
  524. <loglevel>Basic</loglevel>
  525. <cluster>N</cluster>
  526. <slave_server_name />
  527. <set_append_logfile>N</set_append_logfile>
  528. <wait_until_finished>Y</wait_until_finished>
  529. <follow_abort_remote>N</follow_abort_remote>
  530. <create_parent_folder>N</create_parent_folder>
  531. <logging_remote_work>N</logging_remote_work>
  532. <run_configuration>Pentaho local</run_configuration>
  533. <parameters>
  534. <pass_all_parameters>Y</pass_all_parameters>
  535. </parameters>
  536. <parallel>N</parallel>
  537. <draw>Y</draw>
  538. <nr>0</nr>
  539. <xloc>640</xloc>
  540. <yloc>288</yloc>
  541. </entry>
  542. </entries>
  543. <hops>
  544. <hop>
  545. <from>START</from>
  546. <to>初始化所有表</to>
  547. <from_nr>0</from_nr>
  548. <to_nr>0</to_nr>
  549. <enabled>Y</enabled>
  550. <evaluation>Y</evaluation>
  551. <unconditional>Y</unconditional>
  552. </hop>
  553. <hop>
  554. <from>初始化所有表</from>
  555. <to>同步aav</to>
  556. <from_nr>0</from_nr>
  557. <to_nr>0</to_nr>
  558. <enabled>Y</enabled>
  559. <evaluation>Y</evaluation>
  560. <unconditional>N</unconditional>
  561. </hop>
  562. <hop>
  563. <from>同步aav</from>
  564. <to>DUMMY</to>
  565. <from_nr>0</from_nr>
  566. <to_nr>0</to_nr>
  567. <enabled>Y</enabled>
  568. <evaluation>Y</evaluation>
  569. <unconditional>N</unconditional>
  570. </hop>
  571. <hop>
  572. <from>初始化所有表</from>
  573. <to>同步douban</to>
  574. <from_nr>0</from_nr>
  575. <to_nr>0</to_nr>
  576. <enabled>Y</enabled>
  577. <evaluation>Y</evaluation>
  578. <unconditional>N</unconditional>
  579. </hop>
  580. <hop>
  581. <from>初始化所有表</from>
  582. <to>同步lottery</to>
  583. <from_nr>0</from_nr>
  584. <to_nr>0</to_nr>
  585. <enabled>Y</enabled>
  586. <evaluation>Y</evaluation>
  587. <unconditional>N</unconditional>
  588. </hop>
  589. <hop>
  590. <from>初始化所有表</from>
  591. <to>同步sp-dev</to>
  592. <from_nr>0</from_nr>
  593. <to_nr>0</to_nr>
  594. <enabled>Y</enabled>
  595. <evaluation>Y</evaluation>
  596. <unconditional>N</unconditional>
  597. </hop>
  598. <hop>
  599. <from>初始化所有表</from>
  600. <to>同步aps</to>
  601. <from_nr>0</from_nr>
  602. <to_nr>0</to_nr>
  603. <enabled>Y</enabled>
  604. <evaluation>Y</evaluation>
  605. <unconditional>N</unconditional>
  606. </hop>
  607. <hop>
  608. <from>同步aps</from>
  609. <to>DUMMY</to>
  610. <from_nr>0</from_nr>
  611. <to_nr>0</to_nr>
  612. <enabled>Y</enabled>
  613. <evaluation>Y</evaluation>
  614. <unconditional>N</unconditional>
  615. </hop>
  616. <hop>
  617. <from>同步douban</from>
  618. <to>DUMMY</to>
  619. <from_nr>0</from_nr>
  620. <to_nr>0</to_nr>
  621. <enabled>Y</enabled>
  622. <evaluation>Y</evaluation>
  623. <unconditional>N</unconditional>
  624. </hop>
  625. <hop>
  626. <from>同步lottery</from>
  627. <to>DUMMY</to>
  628. <from_nr>0</from_nr>
  629. <to_nr>0</to_nr>
  630. <enabled>Y</enabled>
  631. <evaluation>Y</evaluation>
  632. <unconditional>N</unconditional>
  633. </hop>
  634. <hop>
  635. <from>同步sp-dev</from>
  636. <to>DUMMY</to>
  637. <from_nr>0</from_nr>
  638. <to_nr>0</to_nr>
  639. <enabled>Y</enabled>
  640. <evaluation>Y</evaluation>
  641. <unconditional>N</unconditional>
  642. </hop>
  643. </hops>
  644. <notepads>
  645. </notepads>
  646. <attributes>
  647. <group>
  648. <name>METASTORE.pentaho</name>
  649. <attribute>
  650. <key>Default Run Configuration</key>
  651. <value>{"namespace":"pentaho","id":"Default Run Configuration","name":"Default Run Configuration","description":"Defines a default run configuration","metaStoreName":null}</value>
  652. </attribute>
  653. </group>
  654. <group>
  655. <name>{"_":"Embedded MetaStore Elements","namespace":"pentaho","type":"Default Run Configuration"}</name>
  656. <attribute>
  657. <key>Pentaho local</key>
  658. <value>{"children":[{"children":[],"id":"server","value":null},{"children":[],"id":"clustered","value":"N"},{"children":[],"id":"name","value":"Pentaho local"},{"children":[],"id":"description","value":null},{"children":[],"id":"readOnly","value":"Y"},{"children":[],"id":"sendResources","value":"N"},{"children":[],"id":"logRemoteExecutionLocally","value":"N"},{"children":[],"id":"remote","value":"N"},{"children":[],"id":"local","value":"Y"},{"children":[],"id":"showTransformations","value":"N"}],"id":"Pentaho local","value":null,"name":"Pentaho local","owner":null,"ownerPermissionsList":[]}</value>
  659. </attribute>
  660. </group>
  661. </attributes>
  662. </job>

4,kettle.properties变量

  1. 名称 值
  2. local_ip localhost
  3. local_user root
  4. password 123456
  5. schemeName_aav aav
  6. schemeName_aav1 aav1
  7. schemeName_aps aps
  8. schemeName_aps1 aps1
  9. schemeName_douban douban
  10. schemeName_douban1 douban1
  11. schemeName_lottery lottery
  12. schemeName_lottery1 lottery1
  13. schemeName_sp-dev sp-dev
  14. schemeName_sp-dev1 sp-dev1

5,在使用组件时,经常会遇到一个问题:数据库中某个值设置的是非null,在同步数据时,起始源数据库的表字段值为空字符串,在进入到kettle中时会默认编程null,这时直接同步会报错,需要更改kettle的配置变量。

        kettle.properties -》KETTLE_EMPTY_STRING_DIFFERS_FROM_NULL=Y

更改后需要重启kettle

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/695829
推荐阅读
相关标签
  

闽ICP备14008679号