Six Stars

Dynamically spliting feild values based on comma seperation

Hi Team

 

 I am having my source data like this

Customer_id

Us,Uk,Aus,EU

US,UK

US,AUS,EU

JAP,Uk,US,UK,EU

Field is separated with multiple comma seperated values, i can use textractdelimted for spliting but here i can suspect the values coming so how to dynamically seperate based on comma,please suggest,quick response is much appriciated.

 

Thanks

Saranya

 

4 REPLIES
Nine Stars

Re: Dynamically spliting feild values based on comma seperation

By using tNormalize you can split record in number of records based on delimiter. 

 

Talend.PNG

Veeranjaneyulu Boppudi
Six Stars

Re: Dynamically spliting feild values based on comma seperation

Hi Veeranjaneyulu 

 

Thanks for the quick response but here columns are converted to rows i want to split my data with rsepect to rows only

 

Thanks

Saranya

Six Stars

Re: Dynamically spliting feild values based on comma seperation

Hi Veeranjaneyulu 

 

Thanks for the quick response but here columns are converted to rows i want to split my data with rsepect to feilds (columns) only

 

For much clear understanding

Source

ID

Uk,Us,Aus,Eu

Uk,US

UK,US,AUS,Lon,Afri

Output

Column1 column2 column3 column4 column5

Uk          US           Aus         EU

Uk          US

UK        US            AUS       LON          Afri

 

Here i cant determinate how many values will be present in source.

 

 

Thanks

Saranya

Nine Stars

Re: Dynamically spliting feild values based on comma seperation

Hi Saranya,

 

We need to define fixed number of fields to split one column to number of columns.

If we know max number of possible columns then we can use tExtractDelimitedFields object.

Talend3.PNG

 

Regards,

 

 

Veeranjaneyulu Boppudi