交易数据的 Pentaho 二进制表示
Pentaho binary presentation to transactional data
我想像这样从 CSV 文件转换数据
ID 1 2 3 4 5 6 7 8 9
1 0 0 0 0 1 0 1 0 0
2 1 0 1 0 1 0 0 0 0
3 0 0 0 0 1 1 0 0 0
转换成这样的 CSV 文件
ID Item
1 5
1 7
2 1
2 3
2 5
3 5
3 6
如何转换该文件?
用CSV file input
获取数据,然后用Row Normalizer
绕ID列旋转,Filter the rows
用Item=0,把结果放在Text output file
使用 CSV 格式。
唯一具有挑战性的部分可能是标准化器的定义 。
Row filter
很简单。如果是第一次使用它,请注意,如果指定 send true data to step
,则还必须指定 send false data to step
。在您的情况下,不要指定任何内容,因此只有真实的数据填充流过。
我可以建议你阅读 Official StartUp guide : Introduction to transformations
.
您还可以获得有关水壶的书:Pentaho Kettle Solutions: Building Open Source ETL Solutions with Pentaho Data Integration
M. Casters、R. Bouman 和 J. van Dongen 着。这是一本厚重的书,但是内容详尽,还没有过时。
您还可以查看随您的发行版一起提供的示例目录。它包含几乎所有步骤的工作示例。
我想像这样从 CSV 文件转换数据
ID 1 2 3 4 5 6 7 8 9
1 0 0 0 0 1 0 1 0 0
2 1 0 1 0 1 0 0 0 0
3 0 0 0 0 1 1 0 0 0
转换成这样的 CSV 文件
ID Item
1 5
1 7
2 1
2 3
2 5
3 5
3 6
如何转换该文件?
用CSV file input
获取数据,然后用Row Normalizer
绕ID列旋转,Filter the rows
用Item=0,把结果放在Text output file
使用 CSV 格式。
唯一具有挑战性的部分可能是标准化器的定义
Row filter
很简单。如果是第一次使用它,请注意,如果指定 send true data to step
,则还必须指定 send false data to step
。在您的情况下,不要指定任何内容,因此只有真实的数据填充流过。
我可以建议你阅读 Official StartUp guide : Introduction to transformations
.
您还可以获得有关水壶的书:Pentaho Kettle Solutions: Building Open Source ETL Solutions with Pentaho Data Integration
M. Casters、R. Bouman 和 J. van Dongen 着。这是一本厚重的书,但是内容详尽,还没有过时。
您还可以查看随您的发行版一起提供的示例目录。它包含几乎所有步骤的工作示例。