One Star zo
One Star

Split rows of data after special characters

Hai,
How do I do if I have a row of data such that 10.2.3.123 and I wanted it to be into a new column with :
Column A | Column B | Column C | Column D
10           | 2            | 3            | 123
Would you mind to give me some advice?
Thank You in Advance,
ZO
13 REPLIES
Moderator

Re: Split rows of data after special characters

Hi,

Have you tried component TalendHelpCenter:tExtractDelimitedFields?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star zo
One Star

Re: Split rows of data after special characters

Hi Sabrina,
Is it proper to use tExtractDelimitedFields? My source is not a delimited file, it is from a column in a database that I need to extract the data from the column.
Seventeen Stars

Re: Split rows of data after special characters

Yes, Sabrina told you exactly what you need. Read the content which is actually delimited in a column and use this column in the mentioned component as input field. This content will be separated into new columns based in the delimiter (in your case the pipe).
One Star

Re: Split rows of data after special characters

Sorry..
One Star

Re: Split rows of data after special characters

hi, all..
i have tried the job using tFileInputDelimited which suggested before.  
Source = 1.2.3.4.5 in single row by excel. The problem is the output not exist at that column.
Output = one| two| three| four| five
              1  |  2  |   3    |  4  |  5
the output like image below :
One Star zo
One Star

Re: Split rows of data after special characters

Hi All,
It seems that extractdelimitedfields did not split the data into new column? Is there any other setting in the component that I should figure out?Would you mind to help me?
Moderator

Re: Split rows of data after special characters

Hi zo,
Actually, you should use "\\ ." in field separator.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Moderator

Re: Split rows of data after special characters

Hi yana_isma,

For your actual result, could you please show us your schema setting screenshot of tExtractDelimitedFileld?

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star zo
One Star

Re: Split rows of data after special characters

Hi Sabrina,
thank you for your reply. It is working fine if we put "\\." instead of ".". may I know why should we put \\?
Thanks,
zo
One Star

Re: Split rows of data after special characters

Hi, Sabrina..
Thank you..i already got the answer for my problem just now..
Thank you again for your helps..Smiley Happy
Thanks,
Yana_Isma
Moderator

Re: Split rows of data after special characters

Hi zo,
Since tExtractdelimitedfields component uses regex to split a filed and the regex syntax uses special characters as operators, make sure to precede the regex operator you use as a field separator by a double backslash. For example, you have to use "\\|" instead of "|".
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star zo
One Star

Re: Split rows of data after special characters

Hi Sabrina,
Thank you so much for your help.
Regards,
zo
Moderator

Re: Split rows of data after special characters

Hi zo,
Could you please mark this topic as resolved?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.