将表格作为变量传递-Pentaho

问题描述 投票:0回答:1

我有一个URL:https://api.xero.com/api.xro/2.0/Reports/ProfitAndLoss?fromDate=2019-06-01&toDate=2019-06-30,将在以后用来调用Xero的API。我需要动态更改fromDate和toDate。我想使用https://api.xero.com/api.xro/2.0/Reports/ProfitAndLoss?fromDate= $ {start}&toDate = $ {end}。然后,在字符串中添加要替换日期的“数据网格”。但是,然后,我尝试“设置变量” /“获取变量”,但我不断收到错误消息:“仅预期1个输入行设置变量,并且至少接收2个。”我在做什么错?

enter image description here当前转型:enter image description here转型:

enter image description here

副作业:

enter image description here

最终转换:enter image description here

pentaho pdi
1个回答
0
投票

设置变量中,您只能设置一个行。但是,如果您想传递多行,那么我建议您使用job。在作业首次转换中,使用数据网格,然后使用将行复制到结果。然后再创建一个sub job。要设置变量,请使用transformation。确保在每个输入行都选中执行

© www.soinside.com 2019 - 2024. All rights reserved.