Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a column in my data I am trying to break into 4 columns on a | delimter. I ended up using tExtractRegexFields and got a pattern to work in regex testers finally as groups, but the talend regex won't escape the pipe ( | ) and I end up getting odd results after the tExtractRegex and tConvert (split into strings, then try to cast.
The regex tester is here
here is my pattern: ^([0-9\.]*) \| ([0-9\.]*) \| ([0-9\.]*) \| (.*) \| (.*)$
here is the terrible sample data column: 1 | 6.39 | 9.76 | FL500S | FILTER ASY - OIL
debug console tLog after the regex has | replaced with [] so I can see if the pipes were removed and new columns made.
the tLog row pre regex has :: instead of |
Repair_Order SoLine SoPartLine Qty Cost List Part Part_Description
Repair_Order SoLine SoPartLine Qty_Cost_List_Part_Desc
6262880::3::1::1 | 1736.33 | 2315.11 | 7L3Z7000ABRM | AUTOMATIC T
6262880 [] 3 [] 1 [] 1 [] [] [] []
6262880 [] 3 [] 1 [] [] 1736.33 | 2315.11 | 7L3Z7000ABRM | AUTOMATIC [] [] []
6262880::3::2::1 | 600.00 | 600.00 | 7L3Z7000ABRM-C | 7L3Z 7000 A
6262880 [] 3 [] 2 [] 1 [] [] [] []
6262880 [] 3 [] 2 [] [] 600.00 | 600.00 | 7L3Z7000ABRM-C | 7L3Z 7000 [] [] []