简体   繁体   English

Pentaho行到变量

[英]Pentaho rows to variables

I am trying to create a transformation which takes values from a table input (lets say, 10 rows) and in turns creates variables from the values from the rows. 我正在尝试创建一个转换,该转换从表输入(比如说10行)中获取值,然后从行中的值中创建变量。 For each row in the original set, I then need to do a new transformation using the variables. 然后,对于原始集中的每一行,我需要使用变量进行新的转换。

How can I loop through a bunch of rows, one by one, reading it into variables which will be used later in a transformation of its own? 我如何才能一堆一遍地遍历一排行,将其读入变量,这些变量将在以后的转换中使用?

looping in PDI is a bit complicated. PDI中的循环有点复杂。

You can use the following proceed: 您可以使用以下步骤:

  1. Create a job in PDI. 在PDI中创建工作。 First execute a Transformation, which reads or generates the rows you need and use the "Copy rows to result" step. 首先执行转换,该读取或生成所需的行,然后使用“复制行以生成结果”步骤。
  2. After that create a execute Job step in the first Job. 之后,在第一个作业中创建一个执行作业步骤。 Here you have to check the "Execute for every input row" Option in the "Advanced" settings of the job. 在这里,您必须检查作业的“高级”设置中的“为每个输入行执行”选项。 In this job you create and execute the final Transformation, which is transforming your data. 在此作业中,您将创建并执行最终的转换,即转换数据。
  3. In this transformation you have to use the "get rows from result". 在此转换中,您必须使用“从结果中获取行”。 Here you can finally read the variables you have defined before. 在这里,您最终可以阅读之前定义的变量。

Hope i could help you. 希望我能帮助你。 Best regards. 最好的祝福。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM