Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I came across this scenario in an interview, i wasnt quite sure on how to solve this??
Could you guys help me on this ?
Source:
id,Name
10,A
20,K
10,B
30,L
40,M
10,C
20,Y
Target:
10,ABC
20,KY
30,L
40,M
Thanks,
Ankit
Hi Ankit,
You can use tDenormalize to get the required output. In the component view of tDenormalize choose one column name and in the delimiter don't give anything.
If your query is answered, please mark the topic as resolved.
Thanks,
Aarif
You use the tDenormalize component without Delimiter (tSortRow_1 will just sort the output by id). The input schema is just "id" and "value":
This is the output:
[statistics] connected .--+-----. |tLogRow_2| |=-+----=| |id|value| |=-+----=| |10|A | |20|K | |10|B | |30|L | |40|M | |10|C | |20|Y | '--+-----' .--+-----. |tLogRow_1| |=-+----=| |id|value| |=-+----=| |10|ABC | |20|KY | |30|L | |40|M | '--+-----' [statistics] disconnected
Wow. Three solutions at the same time - enjoy.
There are two unique solutions only given not three.
OK. Let me rephrase that:
Wow. Solutions from three people at the same time - enjoy.
Hi @manodwhb,@JR,@AarifAkhtar ,
Thanks for your quick responses.
I was implement all the your solutions and got the required o/p.
@manodwhb - I have one doubt though what is the difference between list function and list(object) function in taggregaterow component.
Thanks,
Ankit
@ankit7359 , As per my understanding the list function work for Sting data type ,if you have object datatype which you want to concatenate for that group you may be need to use list(Object).
@ankit7359 ,Please mark this topic as resolved so tat it would be useful to others.