I have some data which looks like this:
Col1 Col2 Col3 Col4
1 abc wer 4
2 abc wer 3
3 abc wer 6
My requirement is to get a unique row, which is unique at col2 and col3 level. While I don't need what's in the Col1 or Col4, I intend to keep the highest value of Col4. This requirement thus makes me want to keep record number 3.
In the tUniqRow component, I only have the option to specify col2 and col3. Going by that, there are three records matching that criteria.I can't check the col4 since it'll yield three different records (pretty much the dataset).
How would the tUniqRow component know, which record to keep? If it 'always' picks the first record of the group, I must sort the data at Col4 level so that the record with value 6 comes at the top. However, since I don't understand how the tUniqRow operates, I can't take a call.
It'd be great to have someone confirm this.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Part 2 of a series on Context Variables
Learn how to do cool things with Context Variables
Find out how to migrate from one database to another using the Dynamic schema