my input file has this specific format :
<PIN_NUMBER> T001 <NAME> TR_125E <OPERATIONAL_NAME> TR_125E <TYPE> ARRIVEE <VISU> ANY <ATTRIBUT> SANS <BALISES> A1 COMP_AAA (PRINTABLE) B1 (PRINTABLE) C1 CC_LORNI (PRINTABLE) <END_LIST>
Could you suggest me, which component of Talend would be the most appropriate to read this file?
Since the file is not any specific format, why don't you try reading it using a tinputdelimited component with a rare field separator like "!!!!!!!". This will parse entire line as a single string field. Then use regular expressions within tmap/tjavarow to parse the fields based on proper if else conditions.
pseudo logic :-
if substring (input_row.inboundstring,10) is equal to "<PIN_NUMBER>"
output_row.pin_number = trim(substring (input_row.inboundstring,11, string_length() )
Bit circuitous way but it should help in your case.
Yes, I can also use the tFileInputRow/tFileInputFullRow or tFileInputRegex (?), but I'd like to find a better solutions ...
Thank you for your attention Nikhil
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Part 2 of a series on Context Variables
Learn how to do cool things with Context Variables
Find out how to migrate from one database to another using the Dynamic schema