如何在 linux 中执行 .ktr 文件?

How to execute .ktr file in linux?

如问题所述,我需要执行 .ktr 文件,但通过 linux

在 windows 我通常只是这样做 :

"C:\Program Files\Pentaho Data Integration - Kettle 6.1.0.1\kitchen.bat" -file:"C:/Users/Username/Documents/Pentaho Projects/Job - System Integration.kjb"

但我仍然对如何在 Linux Centos 7

中做到这一点感到困惑

您的问题提到了 运行ning 转换,但您的示例调用了 kitchen.bat,这仅适用于作业。

对于 运行 转换,您需要调用 pan,而不是 kitchen。

在 Windows 中,您 运行 通过调用 pan.bat 进行转换 在Linux你运行pan.sh.

~~在Ubuntu~~

求职:

1.1。对于 pentaho 作业 (.kjb) 文件:

sh /home/ubuntu/------path------/data-integration/kitchen.sh -file="/home/ubuntu/------path------/Pentaho_Projects/Job_System_Integration.kjb"

1.2。如果您想将 pentaho 作业日志输出保存在文件中,则:

sh /home/ubuntu/------path------/data-integration/kitchen.sh -file="/home/ubuntu/------path------/Pentaho_Projects/Job_System_Integration.kjb" > "/home/ubuntu/------path------/Pentaho_Projects/Job_System_Integration.log"

1.3。如果你想在 pentaho 数据集成作业中将值作为参数发送,那么(你必须在作业的属性中定义参数并将其用作 ${parameter_name} 在该作业中的任何地方):

sh /home/ubuntu/------path------/data-integration/kitchen.sh -file="/home/ubuntu/------path------/Pentaho_Projects/Job_System_Integration.kjb" > "/home/ubuntu/------path------/Pentaho_Projects/Job_System_Integration.log" -param:parameter_name=parameter_value

转换:

2.1 对于 pentaho 转换 (.ktr) 文件:

sh /home/ubuntu/------path------/data-integration/pan.sh -file="/home/ubuntu/------path------/Pentaho_Projects/Job_System_Integration.ktr"

2.2。如果您想将 pentaho 转换日志输出保存在文件中,则:

sh /home/ubuntu/------path------/data-integration/pan.sh -file="/home/ubuntu/------path------/Pentaho_Projects/Job_System_Integration.ktr" > "/home/ubuntu/------path------/Pentaho_Projects/Job_System_Integration.log"

我建议不要在 file/folder 名称中使用空格。