Spoon User Guide ================================================== https://wiki.pentaho.com/display/EAI/Spoon+User+Guide .06 Hops ---------------------------------------- .. image:: https://wiki.pentaho.com/download/attachments/7700876/100002010000018E000000C95B2F4898.png?version=1&modificationDate=1210853744000&api=v2 Transformation Hop有不同的颜色,不同颜色有不同的意义,请参考文档获取详情。 .07 Variables ---------------------------------------- Variables can be used throughout Pentaho Data Integration, including in transformation steps and job entries. You define variables by setting them with the Set Variable step in a transformation or by setting them in the kettle.properties file in the directory: 变量可以在整个Pentaho Data Integration中使用,包括在转换步骤和作业条目中使用。 您可以通过在转换中使用“设置变量”步骤设置变量或在目录的“ kettle.properties”文件中设置变量来定义变量: $HOME/.kettle (Unix/Linux/OSX) C:\Documents and Settings\\.kettle\ (Windows XP) C:\Users\\.kettle\ (Windows Vista, 7 and later) 使用它们的方法是通过使用“获取变量”步骤来获取它们,或者通过指定元数据字符串,例如: linux: ${VARIABLE} windows: %%VARIABLE%% 设置和访问变量的其他方式: #. 在转换中使用Get System Info步骤 #. 在Execute a transformation/job窗口中 #. 也可以通过命名参数设置变量 The scope of a variable is defined by the place in which it is defined. 变量的范围由定义的位置所决定。 变量类型: #. Environment variables #. Kettle variables #. Internal variables 由于环境变量的范围太广,因此引入了Kettle变量,以提供一种方法来定义设置该变量的作业本地的变量。 转换中的“设置变量”步骤可让您指定要在哪个作业中设置变量的范围(即父作业,祖父母作业或根作业)。 "Set Variable" step in a transformation Steps参考文档 ---------------------------------------- https://wiki.pentaho.com/display/EAI/Pentaho+Data+Integration+Steps .. image:: https://img-blog.csdnimg.cn/20200323132342293.png