Nat
Nat

Reputation: 670

Talend: how to split column data into rows

I have one table:

| id | head1|    head2    | head3|  
| 1  |  fv1 |  fw1,fw2,fw3|  fv3 |   
| 2  |  sv2 |  sw1,sw2,sw3|  sv4 |   

And would like to have the following:

| id   | head2 | 
|  1   |  fw1  | 
|  1   |  fw2  |  
|  1   |  fw3  |        
|  2   |  sw1  |        
|  2   |  sw2  |          
|  2   |  sw3  |    

So I would like to split a comma-delimited content of some columns and then copy it over into the different table as rows for search purposes.

Which Talend component should I use to achieve this? Is that possible?

Upvotes: 0

Views: 2551

Answers (1)

Corentin
Corentin

Reputation: 2552

tNormalize should help you with this problem.

Just select "," as field separator, and head2 as the column to normalize.

Upvotes: 2

Related Questions