我在 Pentaho Kettle 的输入步骤中运行以下代码:
SELECT * FROM ${TABELA} WHERE TS_SAMPLETM BETWEEN TO_DATE('${HOJE}', 'DD/MM/YYYY') AND TO_DATE('${SEMANAPASSADA}','DD/MM/YYYY')
但是,当我通过这个 shell 脚本运行作业时:
#!/bin/sh
cd /home/rafael/data-integration/
export HOJE=$(date +"%d/%m/%Y")
export SEMANAPASSADA=$(date -d "7 days ago" +"%d/%m/%Y")
export tabela=tabela1
sh kitchen.sh -file=/home/rafael/data-integration/Job_Oracle_MySql.kjb -param:TABELA=$TABELA -param:HOJE=$HOJE -param:SEMANAPASSADA=$SEMANAPASSADA
表输入步骤不会替换变量。