Kettle study notes (3) - kettle resource library, operation mode and log

1. Kettle Resource Library

  The resource library is used to save conversion tasks, and the conversion tasks created by the user through the graphical interface can be saved in the resource library.

        The resource library allows multiple users to share conversion tasks. Conversion tasks are managed in groups in the resource library in the form of folders, and users can customize the folder name.

  1. Ketle repository metadata

  • Resource library The
    resource library includes file resource library and database resource library.
    After Kettle 4.0, the resource library type can be extended by plug-ins.
  • XML
    file.ktr The root node of the XML file of the transformation file must be <transformation>
. The root node of the kjb job XML is <job>

  2. Kettle resource library type

  Database Repository :
    • Serialize Kettle's metadata into the database, such as the R_TRANSFORMATION table, which
    stores
    • Create and update database repository file repository in Spoon:    A file-based package that implements the org.pentaho.di.repository.Repository interface.     It is the type of resource library added in Kettle 4.0 and later that does not use the resource library :    directly save it as a ktr or kjb file.
  


  

  3. Repository Operations

    Create a new repository:

    After kettle7.0, the new method is slightly different. The new resource library is in the upper right corner -> connect.

    For detailed steps to create a new graphic, please refer to: https://blog.csdn.net/m0_37979608/article/details/77096201

    Use the default admin/admin to log in to the repository!

    If the resource library is named in Chinese, there will be a problem that the resource library cannot be created. Solution, reference : https://blog.csdn.net/liuwenbiao1203/article/details/77579436

    Import/Export Repository:

    Navigation bar->Tools->Import/Export Resource Library, or explore the resource library to export the specified directory, and export it as an .xml file!

    Repository management:

    The new version of kettle management is also in the upper right corner:

    

    A few reference comparisons for choosing a resource library:

    

  4. Unified parameter management

    Some connection information like the resource library should not be hard-coded, so kettle also provides the kettle.properties file to control global variables

    kettle.properties, the file is located in the user.home directory of java. (You can view it by running the class file through java SystemProp)

cafe babe 0000 0031 0023 0a00 0800 130a
0014 0015 0900 1400 160a 0017 0018 0700
0d0a 0005 0013 0a00 0500 1907 001a 0100
063c 696e 6974 3e01 0003 2829 5601 0004
436f 6465 0100 0f4c 696e 654e 756d 6265
7254 6162 6c65 0100 0a53 7973 7465 6d50
726f 7001 0005 7072 696e 7401 0004 6d61
696e 0100 1628 5b4c 6a61 7661 2f6c 616e
672f 5374 7269 6e67 3b29 5601 000a 536f
7572 6365 4669 6c65 0100 0f53 7973 7465
6d50 726f 702e 6a61 7661 0c00 0900 0a07
001b 0c00 1c00 1d0c 001e 001f 0700 200c
0021 0022 0c00 0e00 0a01 0010 6a61 7661
2f6c 616e 672f 4f62 6a65 6374 0100 106a
6176 612f 6c61 6e67 2f53 7973 7465 6d01
000d 6765 7450 726f 7065 7274 6965 7301
0018 2829 4c6a 6176 612f 7574 696c 2f50
726f 7065 7274 6965 733b 0100 036f 7574
0100 154c 6a61 7661 2f69 6f2f 5072 696e
7453 7472 6561 6d3b 0100 146a 6176 612f
7574 696c 2f50 726f 7065 7274 6965 7301
0004 6c69 7374 0100 1828 4c6a 6176 612f
696f 2f50 7269 6e74 5374 7265 616d 3b29
5600 2100 0500 0800 0000 0000 0400 0100
0900 0a00 0100 0b00 0000 1d00 0100 0100
0000 052a b700 01b1 0000 0001 000c 0000
0006 0001 0000 0005 0001 000d 000a 0001
000b 0000 0019 0000 0001 0000 0001 b100
0000 0100 0c00 0000 0600 0100 0000 0a00
0100 0e00 0a00 0100 0b00 0000 2c00 0200
0200 0000 0cb8 0002 4c2b b200 03b6 0004
b100 0000 0100 0c00 0000 0e00 0300 0000
0f00 0400 1000 0b00 1200 0900 0f00 1000
0100 0b00 0000 2d00 0200 0200 0000 0dbb
0005 59b7 0006 4c2b b600 07b1 0000 0001
000c 0000 000e 0003 0000 0016 0008 0017
000c 0018 0001 0011 0000 0002 0012 
SystemProp.class
// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2014-8-18 15:05:00
// Home Page : http://members.fortunecity.com/neshkov/dj.html  - Check often for new version!
// Decompiler options: packimports(3) 
// Source File Name:   SystemProp.java

import java.util.Properties;

public class SystemProp
{

    public SystemProp()
    {
    }

    public void SystemProp()
    {
    }

    public void print()
    {
        Properties properties = System.getProperties();
        properties.list(System.out);
    }

    public static void main(String args[])
    {
        SystemProp systemprop = new SystemProp();
        systemprop.print();
    }
}
SystemProp.jad

    找到user.home下的.kettle/kettle.properties

    写入变量后,使用${var.name}进行变量读取即可(类似shell的变量形式)

  // 使用参数表等情况,暂不赘述

 

Guess you like

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