I’m actually working on a talend job. I need to load from an excel file to an oracle 11g database.
I can’t figure out how to break a field of my excel entry file within talend and load the broken string into the database.
For example I’ve got a field like this:
toto:12;tata:1;titi:15
And I need to load into a table, for example grade:
| name | grade |
|------|-------|
| toto |12 |
| titi |15 |
| tata |1 |
|--------------|
Thank’s in advance
In a Talend job, you can use
tFileInputExcelto read your Excel file, and thentNormalizeto split your special column into individual rows with a separator of “;”. After that, usetExtractDelimitedFieldswith a separator of “:” to split the normalized column intonameandgradecolumns. Then you can use atOracleOutputcomponent to write the result to the database.While this solution is more verbose than the Java snippet suggested by AlexR, it has the advantage that it stays within Talend’s graphical programming model.