Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am using Talend Open Studio for Data Integration and I need to do transformation of Excel Input Data and could help some hints.
From an Excel Input File I have Values like this
43892_High Tower Company ABC LTD.
5281_Base Boring & Co. XY
I want to Insert / Update an MySQL Database > Table "Companies" with
----------
ID:43892
CompanyName: High Tower Company ABC LTD.
----------
ID:5281
CompanyName:Base Boring & Co. XY
Can I do that with tmap?
Thank you so much for your help.
A tMap is what the names says, a mapping tool. A tMap does not insert anything, it maps data from an input to an output.
You need for your use simply a regex function. The component tExtractRegexFields.
The component expects a field (from the incoming flow containing the data and a regex expression to split the data into regex groups. Every regex group will be automatically assigned to a field of the outgoing schema which does not exists in the incoming schema.
I have added an example job doing the work you have ask for.
The magic is the regex expression: "^([0-9]{1,})_(.*)$" which separates the incoming combined id+name into id and name separate.