Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Compare 3 datasets simultaneously and update other column on basis of comparison result.

Hello Everyone,

 

Could you please help me with this below query.

I am using talend and postgres database. I have one table which has records with different types defined in column record_type(i.e- new, old and validated).

Now I need to compare these 3 type at once and update other column with different value.

example - If new,old and validated are same then "A"

                 If new,old are same and validate is different then "B"

                 If old and validated are same and new is different then "C"  and so on.

 

Could you please provide some efficient way.

 

Thanks,

Shubhi Srivastava

Labels (4)
3 Replies
manodwhb
Champion II
Champion II

@shubhi04 , can you give some sample input and output data?

akumar2301
Specialist II
Specialist II

There must be record key if you have record type.

Now with you can do many things

1) sort input with key column
2) pivot the table on key column
https://help.talend.com/reader/jomWd_GKqAmTZviwG_oxHQ/x2GUXKMQs_wrCX0kdZDwDg
Or

Memories three records value using tmemorizerows

3) then compare results accordingly.

Abhishek
Anonymous
Not applicable
Author

@uganesh , 

my overall requirement is different. I don't want to pivot data. As the data is being aggregated in later steps. and then aggregated data again get de-aggregate. Also, in my table there are more then 100 columns.

Also, the data size is huge and coming in daily batches so need to maintain performance too.

 

@manodwhb 

Attaching one sample excel with this. Just not putting exact columns and data.

 


Sample_test.xlsx