Highlighted
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
Highlighted
Moderator

## Re: Talend Interview Scenario - 1

@ankit7359 ,please find the below solution.

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

All Replies
Highlighted
Moderator

## Re: Talend Interview Scenario - 1

@ankit7359 ,please find the below solution.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Highlighted
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.

Thanks,

Aarif

Highlighted
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":

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```
Highlighted
Nine Stars

## Re: Talend Interview Scenario - 1

Wow. Three solutions at the same time - enjoy.

Highlighted
Moderator

## 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.
Highlighted
Nine Stars

## Re: Talend Interview Scenario - 1

OK. Let me rephrase that:

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

Highlighted
Nine Stars

## Re: Talend Interview Scenario - 1

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

Highlighted
Moderator

## 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.
Highlighted
Moderator

## 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.

## OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

## 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