Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a column that has either 1 ID or a combination of of 2 or more IDs separated by empty spaces or dash or (dash and space) or any symbol , example below
8546
2549-98521
1235 - 1245- 4799/56478 - 241336
1225 / 25698
3698775
etc....
I want to separate the IDs in a way to have each ID on a separate row...
Thanks
Hi,
Here is a component tNormalize which normalizes the input flow following SQL standard.
https://help.talend.com/display/TalendComponentsReferenceGuide63EN/tNormalize
Let us know if it is OK with you.
Best regards
Sabrina
Great mate, it worked but I still got one question:
How do I add more separators in case I have different separators in my rows as described above in my original question?
Hi,
Could you please show us your expected result here?
Best regards
Sabrina
Hi,
Use replaceAll to remove/replace undesired separators before to go with tNormalize:
Regards,
Thank you TRF, I will try it in case the tnormalize did not work for multiple special characters (separators).
example:
45896-151315=988778
231154/54564
54564-4544
121212
Result:
45896
151315
988778
231154
54564
54564
4544
121212
NOTE: the separator is not known to me as it might be any special character or a combination of (space and special character).
Hi Moe,
You can achive this by using tJavaRow and tNormalizer.
SRC-->tJavaRow-->TNormalizer-->tLogRow
Code in tJavaRow: output_row.COL=input_row.COL.replaceAll( "[^\\d]", " " );
tNormalizer:
OutPut:
[statistics] connecting to socket on port 3762
[statistics] connected
.------.
|outPut|
|=----=|
|COL |
|=----=|
|45896 |
|151315|
|988778|
|231154|
|54564 |
|54564 |
|4544 |
|121212|
'------'
[statistics] disconnected
Job job_MultiDelimiterSplit ended at 07:07 25/04/2017. [exit code=0]
Regards,
Thank you vboppudi, and thank you all. It seems Im getting good results.