Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
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?
Best regards
Hi,
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.
Warm Regards,
Nikhil
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
Best Regards