Kettle install and simple to use

Kettle install and use

installation

Need to be prepared prior to installation environment for the Java environment, you need to configure in advance jdk

Once downloaded, extract can be used.

use

1. Because the tool primarily to operate the database, it is necessary to advance mysql the jar package into lib folder below.

2. Use visual graphic interface, double-click operation

 

 

 

The initial interface is as follows:

 

 

These two operations are the two types of transformation and, following simple example of these two applications.

Example Operation

 

Conversion operations

 

Objectives: The data in Table stu1 data transferred to the data in Table 2 , if the two have the same id are covered. If not inserted into the data table.

data preparation:

stu1 table

 

 

 

stu2 table

 

 

 

Double-click conversion to the new interface

 

 

 

Select Input: Table Input

Select Output: Insert / Update

Then hold shift using the mouse to connect two nodes.

As shown below:

 

 

 

b) Double-click input table:

 

 

 

Fill in the corresponding connection parameters, in the present example mysql Example

 

Set up a new connection parameters, click This completed the test, click OK after the successful.

c) In the sql fill in at the sql statement

 Select * from stu1

You can click on the preview below to see the data in the current table

Click OK to exit.

d)

Double-click the insert / update

Select the target table: find STU2 , click OK

 

Then, as

 

The third step operation is shown (fields do not match removed)

 

 

Because our goal is id be updated to insert standard. So we need to delete several other fields in the query keyword list.

Update field, we want to id the update is set to N , as id is to find the basis, so you can not update id .

Click OK after the operation is completed, you can then execute.

 

 

Symbol of success as follows:

 

 

 Job Actions

 

New, operations,

Add the following, Start and conversion under a common directory, SQL in the script directory.

 

 

 

Double-click the first step in converting stored previously selected job

 

 

Then double-click SQL , New Connection

In sql written under the sql statement

insert into stu2 values(5,'5')

Click execute, run successfully.

The main purpose of this process is a timing data table update period may be set to one day or one week and the like.

Arrangement is a double tap interval start.

Guess you like

Origin www.cnblogs.com/wys-373/p/11443531.html