Kettle参数、变量和全局变量的使用
一、要使用kettle.properties
变量,需要加入Kettle环境变量
Windows:
变量名:KETTLE_HOME,变量值:C:\pdi-ce-8.3.0.0-371\data-integration(kettle主目录),重启Kettle即可。
Linux:
vi /etc/profile
export KETTLE_HOME=/usr/local/kettle#kettle主目录
source /etc/profile
二、在kettle主目录新建.kettle
文件夹(保证跟 spoon.bat
同一目录),然后新建kettle.properties
文件,变量采用key-value的方式,如下:
# This file was generated by Pentaho Data Integration version 6.1.0.1-196.
#
# Here are a few examples of variables to set:
#
# PRODUCTION_SERVER = hercules
# TEST_SERVER = zeus
# DEVELOPMENT_SERVER = thor
#
# Note: lines like these with a # in front of it are comments
#
#######db_localhost#########
CONN_IP_local_F = 127.0.0.1
CONN_NAME_local_F = test
CONN_PROT_local_F = 3306
CONN_USERNAME_local_F = root
CONN_USERPASS_local_F = root
注意:SQL语句需要把替换SQL语句里的变量
勾选。
未经同意,本站内容谢绝转载!