1 Create a good conversion under Windows and place it under one of the Linux folders. such as: Put the 0816_em.ktr file under the/home/cfj/kettle/testdemo.
Note that the database user name and password may need to be changed if it is a job file such as: JOB0816_01.KJB. Remember to change the path in which it is stored, such as:
2 Edit the script file, put it in the corresponding folder, and give permission
The permissions are given in the following ways:
chmod +x./test.sh #使脚本具有执行权限
./test.sh #执行脚本
The testshell0817.sh script is as follows:
#!/bin/bash
Export Java_home=/usr/lib/jvm/java-8-oracle
Export JRE_HOME=${JAVA_HOME}/JRE
Export Classpath=.:${java_home}/lib:${jre_home}/lib
Export Path=${java_home}/bin: $PATH
/home/cfj/kettle/data-integration/pan.sh-file=/home/cfj/kettle/testdemo/0816_em.ktr
Kettle under Linux for shell scripts to perform conversion tasks