[Complex Flat File] Reading Complex Delimited File
Posted: Tue Sep 17, 2019 1:31 pm
Hi everybody.
I need to find a solution to read a complex file, delimited by ';'.
Imagine the following layout:
Document;QuantityPhone;PhoneNumber;PhoneNumberArea;QuantityEmail;Email;EmailStatus
111111;1;8888-8888;11;1;test@test.com;Valid
222222;2;7777-7777;11;6666-6666;11;1;test@test.com;Valid
333333;3;6666-6666;11;5555-5555;11;4444-4444;11;2;test@test.com;Valid;test2@test.com;Valid
In other words, when fields value "QuantityPhone" and "QuantityEmail" are greater than 1, the group of fields related to "Phone" and "Email" are presented as new columns.
So, each line/register can have different number of columns. It is a dynamic delimited file.
I thought we could use CFF object (Complex Flat File) however I guess it is appropriated to positional columns instead of delimited ones.
Could anybody give me some help or any tip about how reading this complex file?
Thanks In advance.
Best regards.
I need to find a solution to read a complex file, delimited by ';'.
Imagine the following layout:
Document;QuantityPhone;PhoneNumber;PhoneNumberArea;QuantityEmail;Email;EmailStatus
111111;1;8888-8888;11;1;test@test.com;Valid
222222;2;7777-7777;11;6666-6666;11;1;test@test.com;Valid
333333;3;6666-6666;11;5555-5555;11;4444-4444;11;2;test@test.com;Valid;test2@test.com;Valid
In other words, when fields value "QuantityPhone" and "QuantityEmail" are greater than 1, the group of fields related to "Phone" and "Email" are presented as new columns.
So, each line/register can have different number of columns. It is a dynamic delimited file.
I thought we could use CFF object (Complex Flat File) however I guess it is appropriated to positional columns instead of delimited ones.
Could anybody give me some help or any tip about how reading this complex file?
Thanks In advance.
Best regards.