将参数传递给转换的名称 - Pentaho

Passing a parameter to the name of the transformation - Pentaho

我的工作有两个转变。 我的第一次转型。我将行复制到结果:

第二个转换,我想从结果中获取行并将其作为参数传递给转换执行程序:

在转换执行器中我想要:

但我得到:

2021/05/19 14:17:55 - Transformation executor.0 - ERROR (version 8.3.0.0-371, build 8.3.0.0-371 from 2019-06-11 11.09.08 by buildguy) : Unable to load the transformation executor because of an error :
2021/05/19 14:17:55 - Transformation executor.0 - ERROR (version 8.3.0.0-371, build 8.3.0.0-371 from 2019-06-11 11.09.08 by buildguy) : org.pentaho.di.core.exception.KettleException: 
2021/05/19 14:17:55 - Transformation executor.0 - Unable to load transformation [${SHORT_FILENAME}]
2021/05/19 14:17:55 - Transformation executor.0 - 
2021/05/19 14:17:55 - Transformation executor.0 - The transformation path D:/GIT/pentaho/TestCase/${SHORT_FILENAME}.ktr is invalid, and will not run successfully.
2021/05/19 14:17:55 - Transformation executor.0 - 
2021/05/19 14:17:55 - Transformation executor.0 - 
2021/05/19 14:17:55 - Transformation executor.0 -   at org.pentaho.di.trans.StepWithMappingMeta.loadMappingMeta(StepWithMappingMeta.java:177)
2021/05/19 14:17:55 - Transformation executor.0 -   at org.pentaho.di.trans.steps.transexecutor.TransExecutor.loadExecutorTransMeta(TransExecutor.java:510)
2021/05/19 14:17:55 - Transformation executor.0 -   at org.pentaho.di.trans.steps.transexecutor.TransExecutor.init(TransExecutor.java:470)
2021/05/19 14:17:55 - Transformation executor.0 -   at org.pentaho.di.trans.step.StepInitThread.run(StepInitThread.java:69)
2021/05/19 14:17:55 - Transformation executor.0 -   at java.lang.Thread.run(Thread.java:748)

参数的值不能在转换中更改,当您使用复制行以这种方式进行转换时,您暗示参数将针对每一行更改。此外,在转换中使用它,您收到的所有行都将同时处理,或者至少分批处理 n 行,因此您将同时调用 n 转换,我不知道是否这就是你想要做的。

在这种情况下,我认为你应该使用一个作业来调用转换,也许你需要一些解决方法来将参数值传递给要执行的转换(类似于使用你正在调用的转换,但没有获取结果步骤),因此您可以使用转换名称中的参数来调用,因为在作业中您无法做到这一点。