Talend Interview Scenario - 1

Nine Stars

Talend Interview Scenario - 1

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


Accepted Solutions
Forteen Stars

Re: Talend Interview Scenario - 1

@ankit7359 ,please find the below solution.

 

Untitled.pngUntitled.pngUntitled.png

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

All Replies
Forteen Stars

Re: Talend Interview Scenario - 1

@ankit7359 ,please find the below solution.

 

Untitled.pngUntitled.pngUntitled.png

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Six Stars

Re: Talend Interview Scenario - 1

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. 

 

13.PNG

14.PNG

 

If your query is answered, please mark the topic as resolved.

 

Thanks,

Aarif

Nine Stars JR
Nine Stars

Re: Talend Interview Scenario - 1

You use the tDenormalize component without Delimiter (tSortRow_1 will just sort the output by id). The input schema is just "id" and "value":

1.PNG

 

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
Nine Stars JR
Nine Stars

Re: Talend Interview Scenario - 1

Wow. Three solutions at the same time - enjoy.

Forteen Stars

Re: Talend Interview Scenario - 1

There are two unique solutions only given not three.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Nine Stars JR
Nine Stars

Re: Talend Interview Scenario - 1

OK. Let me rephrase that:

Wow. Solutions from three people at the same time - enjoy.

Nine Stars

Re: Talend Interview Scenario - 1

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

Forteen Stars

Re: Talend Interview Scenario - 1

@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).

 

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Forteen Stars

Re: Talend Interview Scenario - 1

@ankit7359 ,Please mark this topic as resolved so tat it would be useful to others.

 

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 3

Read about some useful Context Variable ideas

Blog