Getting Started with kettle

Kettle is a foreign open source ETL tool, written in pure java, can run on Window, Linux, Unix, and data extraction is efficient and stable. Kettle's Chinese name is Kettle. MATT, the main programmer of the project, hopes to put various data into a kettle, and then flow out in a specified format. Kettle is a set of ETL tools that allow you to manage data from different databases by providing a graphical user environment that describes what you want to do, not how you want to do it. There are two script files in Kettle, transformation and job. Transformation completes the basic transformation of data, and job completes the control of the entire workflow.

Baidu experience: jingyan.baidu.com

method/step

 
  1. 1

    Kettle download and installation (kettle version used in this article is 6.1.0.1-196)

    The latest download address of kettle: community.pentaho.com/projects/data-integration/

  2. 2

    open kettle

    First unzip the downloaded compressed package such as: pdi-ce-6.1.0.1-196.zip

    Then open Spoon.bat, as shown:

    Please be patient for a while after opening.

  3. 3

    Build conversion.

    Go to File->New Replacement.

    After the new conversion, establish a DB connection in the main object tree on the left to connect to the database. as the picture shows:

    The process of establishing a database connection is similar to that of other database management software connecting to a database.

    Note: During the process of database connection, an exception that a database connection cannot be found may be reported. That is because you do not have the corresponding database link driver, please download the corresponding driver and put it in the lib folder of kettle.

  4. 4

    Simple datatable insert\update

    (1) Insert a new table

    Select "Core Object" in the left panel, select "Input -> Table Input" in the core object, and drag it to the right panel with the mouse. as the picture shows:

  5. 5

    Double-click the dragged table to edit the table input.

    Select the database connection and edit the sql statement. In this step, you can click Preview to see if you are connected correctly.

  6. 6

    (2) Output to the table by insert\update.

    Select the core object in the left panel, select "Export -> Insert\Update" as shown in the figure:

  7. 7

    EDIT to insert update:

    First: table input join insert update.

    Select the table input, hold down the shift key, and drag to Insert Update.

  8. 8

    Then: Double-click Insert Update to edit it.

    At this point, the conversion is basically done. You can click Run to check the effect and see if there is any error. This must be saved before it can be run, and you can save it to any place at will.

  9. 9

    Use job control to switch the execution above.

    Using the job, you can perform the conversion periodically or periodically, and create a new job. and drag in start and transform from the left panel.

  10. 10

    Double-click start to edit, you can set the execution time, etc.

  11. 11

    Click on install and change, you can set the conversion tasks to be performed, for example, you can perform the conversion we did above, XXX.ktr

    Finally click run.

     

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326149470&siteId=291194637