首页 > 解决方案 > PDI Kettle 中结果行的范围是什么?

问题描述

在kettle 中处理结果行是在程序内部传递列表的唯一方法。但这究竟是如何工作的呢?这个话题没有得到很好的记录,并且有很多问题。

例如,包含 2 个转换的作业可以将结果行从第一个发送到第二个。但是,如果有第三个转换来获取结果行呢?范围是什么?您也可以将结果行传递给子作业吗?您可以根据转换中的逻辑清除结果行吗?

使用列表和数组在编程中是有用且必要的,但在 PDI Kettle 中却令人困惑。

标签: kettlepentaho-spoonpdi

解决方案


I agree that working with result rows may be confusing, but you can be confident: it works.

Yes, you can pass it the a sub-job, and in a series of sub-jobs (define the scope as "valid in the java machine" for the first test).

And no, there is no way to clear the results in a transformation (and certainly not based on a formula). That would mean a terrible overload in maintenance.

Kettle is not an imperative language, it is more of the data-flow family. It means it is nearer the way you are thinking when developing an ETL and much, much more performant. The drawback is that list and array have no meaning. Only flow of data.

And that is what is a result set : a flow of data, like the the result set of a sql query. The next job has to open it, pass each row to the transformation, and close it after the last row.


推荐阅读