Local Variables

来源:互联网 发布:mac下画流程图的工具 编辑:程序博客网 时间:2024/04/29 06:12

Use local variables in Aggregator, Expression, and Rank transformations.
You might use variables to complete the following tasks:
¨ Temporarily store data.
¨ Simplify complex expressions.
¨ Store values from prior rows.
¨ Capture multiple return values from a stored procedure.
¨ Compare values.
¨ Store the results of an unconnected Lookup transformation.

 

 

结果:

 

如果没有对源数据进行排序,那么结果就出错:

排序且AGG未选择Sorted Inputed调试结果:所有group的year_prev都是2017

未排序调试结果:所有group的year_prev都是2015

排序(升序)且AGG选择Sorted Inputed调试结果:group 2014的year_prev=2015,group 2015的year_prev=2016,group 2016的year_prev=2017,group 2017的year_prev=2017

这充分证明AGG Transformation是一个block transformation微笑

 

 

 

 

0 0
原创粉丝点击