Informatica - Concatenate Max value from each colum present in multiple rows for same Primary Key

147 views Asked by At

enter image description here

I have tried traditional approach of using Agg (Group By: ID, Store Name) and Max(Each Object) columns separately.

Then in next expression, Concat(Val1 Val2 Val3 || Val4).

How ever, I'm getting output as '0100'.

But, REQUIRED OUTPUT: 1100

Please let me know, how this can be done in IICS.

1

There are 1 answers

0
Koushik Roy On

IICS is similar to the Powercenter on-prem.

  1. First use an aggregator.
    in Group By tab add ID, Store Name
    in Aggregate tab add max(object1)... please note to set data type and length correctly.

  2. Then use an expression transformation.
    link ID, Store Name first.
    Then concat the max_* columns using pipe -
    out_max=max_col1||max_col2||... please note to set data type and length correctly.

This should generate correct output. I think you are having wrong output because of data length or data type of object fields. Make sure you trim spaces from object data before aggregator.