如何使用Pentaho 8 CE中的另一个数据网格复制行

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

我有一个包含以下字段和一行的数据网格:

Data Grid
Fields: A   , B   , C
Row 1:  fooA, fooB, 

我有另一个数据网格,其中包含以下行 - 只有一个字段 - :

Intervals
Fields: C
Row 1:  10
Row 2:  20
Row 3:  35
Row 4:  40

我想了解哪些Pentaho数据集成(Kettle)步骤/框将用于获取:

Fields: A   , B   , C
Row 1:  fooA, fooB, 10
Row 2:  fooA, fooB, 20
Row 3:  fooA, fooB, 35
Row 4:  fooA, fooB, 40

Merge two data grids

pentaho kettle pentaho-data-integration
1个回答
1
投票

这是一个简单的Join Rows(Cartesian产品),虽然我不知道你将如何将它用于变量数据,如果具有1行多列的Grid将总是具有1行和多列而不是它,a笛卡尔积将从第二个网格中复制N'行中的fooA,fooB。

您在第二个网格中首先需要做的就是将单个字段拆分为2列,一个包含“行X”,另一个包含数字值。

你的KTR应该是这样的:

enter image description here

哪个输出:

enter image description here

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