Kettle installation and use

1: Kettle is developed based on java, so SDK installation is required

2: Kettle itself is free of installation, directly decompress the compressed package data-integration.zip, just open Spoon.bat directly

Package local path: E:\system installation package\slqserver-mysql\data-integration.zip

3: By default, mysql can be connected, but sqlerver needs to download a jar, and copy the jar package jtds-1.3.1.jar directly into Lib.

Only one jtds-1.3.1.jar is needed in the jar package downloaded to connect to sqlserver, and no other copies are required.

The copy path is as follows:

4: At this time, you can directly open the Spoon.bat page, which is a bit slow: as shown below:

First create a new conversion, you can directly click 1: Conversion 2: File-"Add-"Conversion 3: Click the plus sign in the upper left corner to add a conversion function 

5: The newly-added conversion functions are as follows: Under the core object : 1: In the input and output, select Table Input and Table Output and drag them to the conversion 1 page.

Need to link the input library and output library.

6: The main object tree functions are as follows

The mysql link is shown in the figure: select MYSQL and enter the server ip, database name, account number, and password

The sqlserver link database is as follows: select MS SQL Server and enter the server ip, database name, account number, and password

The result after linking is as follows: Under the main object tree:

7: Table input ------ connect table connect to the database configured above, slq statement writes the data that needs to be queried, here top10000 is just to synchronize 10000 data,

 

8: In the table output , here you need to choose to import to the specified library, and select the configured above to connect to the database. Specify the name of the table to be imported. 

Need to select the  specified database field, after selecting, you can click to enter the field mapping

After clicking the input field mapping, you can see that there are

The source field is the input table field (the input table here is relative to the kettle. The data is input to the kettle), that is, the data query in the sqlserver comes into the kettle first

The target field is the field inserted into the mysql table from the kettle.  

Mapping: the mapping data fields that need to be imported directly in the two tables

After the field mapping is completed, click OK, and then click on --- to execute. And you can view the log. If there is an error, you can view the error message

to make.

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin blog.csdn.net/xulong5000/article/details/115062835