问题
I have created one transformation in which rows are generated after several step. Now as a next step, I want to calculate field value for each row based on values of other rows (it is custom logic, so necessary to have access at all rows at one shot).
I considered to use javascript step. In this step, I can access field values of current row but how to access values for other rows. Same way, I checked with User Defined Java Class step, but stuck at the step where how to access other rows value apart from current one.
回答1:
Use Group by step to calculated rows. It has a lot of options such as SUM, Average, Max, Min, First non-null value, Cumulative sum (all rows option only!) , Cumulative average (all rows option only!), etc
来源:https://stackoverflow.com/questions/20267637/in-pentaho-data-integration-update-field-value-in-a-row-depending-on-field-val