Describe the approach for the requirement. Suppose the input is:
The desired output is:
Answer: Use an Expression transformation:-
Expression Transformation Interview Question ( Part - 2) |
Keep in mind the string length of the variable and output ports.
CUME function is used to calculate the cumulative amount based on the argument of the cumulative function. This means, if we call CUME with argument 1, e.g. CUME(1); then on the first call it will re-turn 1; on the second call, it will return 2; on the third call, it will return 3 and so on. Since Informatica process data row by row, this means that when the first row is processed CUME(1) will return 1; for the next row, it will return 2 and so on.
CUME function is used to calculate the cumulative amount based on the argument of the cumulative function. This means, if we call CUME with argument 1, e.g. CUME(1); then on the first call it will re-turn 1; on the second call, it will return 2; on the third call, it will return 3 and so on. Since Informatica process data row by row, this means that when the first row is processed CUME(1) will return 1; for the next row, it will return 2 and so on.
How can we implement aggregation operation without using an Aggregator Transformation in Informatica?
Answer:
We will use the very basic concept of the Expression Transformation, that at a time we can access the previous row data as well as the currently processed data in an expression transformation. What we need is simple Sorter, Expression and Filter transformation to achieve aggregation at Informatica level.
Comments
Post a Comment