Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
ankit7359
Creator II
Creator II

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

Labels (2)
1 Solution

Accepted Solutions
manodwhb
Champion II
Champion II

@ankit7359 ,please find the below solution.

 

0683p000009M73N.png0683p000009M6xk.png0683p000009M73S.png

View solution in original post

9 Replies
manodwhb
Champion II
Champion II

@ankit7359 ,please find the below solution.

 

0683p000009M73N.png0683p000009M6xk.png0683p000009M73S.png

Anonymous
Not applicable

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. 

 

0683p000009M73X.png

0683p000009M70F.png

 

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

 

Thanks,

Aarif

JR1
Creator III
Creator III

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

0683p000009M6hC.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
JR1
Creator III
Creator III

Wow. Three solutions at the same time - enjoy.

manodwhb
Champion II
Champion II

There are two unique solutions only given not three.

JR1
Creator III
Creator III

OK. Let me rephrase that:

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

ankit7359
Creator II
Creator II
Author

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

manodwhb
Champion II
Champion II

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

 

manodwhb
Champion II
Champion II

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