官术网_书友最值得收藏!

Understanding the Kettle home directory

When you run Spoon for the first time, a folder named .kettle is created in your home directory by default. This folder is referred to as the Kettle home directory.

The folder contains several configuration files, mainly created and updated by the different PDI tools. Among these files, there is the kettle.properties file.

The purpose of the kettle.properties file – created along with the .kettle folder, the first time you run Spoon – is to contain variable definitions with a broad scope: Java Virtual Machine. Therefore, it's the perfect place to define general settings; some examples are as follows:

  • Database connection settings: host, database name, and so on
  • SMTP settings: SMTP server, port, and so on
  • Common input and output folders
  • Directory to send log files to

Before continuing, let's add some variables to the file. Suppose that you have two folders, named C:/PDI/INPUT and C:/PDI/OUTPUT, which you will use for storing files. The objective will be to add two variables, named INPUT_FOLDER and OUTPUT_FOLDER, containing those values:

  1. Locate the Kettle home directory. If you work in Windows, the folder could be C:\Documents and Settings\<your_name> or C:\Users\<your_name>, depending on which Windows version you have. If you work in Linux (or similar) or macOS, the folder will most likely be /home/<your_name>/.
  2. Edit the kettle.properties file. You will see that it only contains commented sample lines.
  3. You can safely remove the contents of the file and define your own variables by typing the following lines:
       INPUT_FOLDER=C:/PDI/INPUT
OUTPUT_FOLDER=C:/PDI/OUTPUT

Save the file and restart Spoon, so that it can recognize the variables defined in the file. We will learn how to use these variables in Chapter 2Getting Familiar with Spoon.

主站蜘蛛池模板: 苗栗县| 乌拉特后旗| 襄城县| 华容县| 青岛市| 运城市| 新化县| 大田县| 宾川县| 宁海县| 望谟县| 白山市| 金堂县| 鄂温| 锡林郭勒盟| 汉源县| 陆丰市| 故城县| 隆昌县| 金秀| 锡林浩特市| 诸城市| 张家界市| 陆良县| 汽车| 溧阳市| 神池县| 金平| 固安县| 二手房| 马关县| 临安市| 青浦区| 抚宁县| 页游| 内江市| 怀远县| 长兴县| 长泰县| 清苑县| 平塘县|