Hierarchical/multiple record type flat files

One Star

Hierarchical/multiple record type flat files

Hi,
Does Talend support the use of of multiple record type flat files (also known as hierarchical files) as input files? An example of the type of file I'm referring to is as follows (the fields in the given example are pipe delimited):
00|This is the header record|
01|This is a detail line|with some info|about a customer|and identifies the start of each customer record|
02|This line contains address details|for a customer|
03|This is a transaction line|with statement information|
03|This is a transaction line|with statement information|
03|This is a transaction line|with statement information|
01|This is a detail line|with some info|about a customer|and identifies the start of each customer record|
02|This line contains address details|for a customer|
03|This is a transaction line|with statement information|
99|This is the trailer record|
Thanks.
Community Manager

Re: Hierarchical/multiple record type flat files

Hi Darckness
Currently, there is no component read this kind of file directly. Can you report a new feature on our Bugtracker?
Thanks for your support!
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Hierarchical/multiple record type flat files

Hi,
I need a similar functional, but instead of pipe delimited files I've positional files. What I need is this:
00 (first record is the header)
01 (details about payments)
01 (details about payments)
01 (details about payments)
03 (final record, the trailer)
Since this topic is a little old, is this already available?
Regards,
Felipe Cypriano

Re: Hierarchical/multiple record type flat files

Hi,
I have a similar requirement as given above:
Ex:
00|This is the header record|
01|This is a detail line|with some info|about a customer|and identifies the start of each customer record|
02|This line contains address details|for a customer|
03|This is a transaction line|with statement information|
03|This is a transaction line|with statement information|
03|This is a transaction line|with statement information|
01|This is a detail line|with some info|about a customer|and identifies the start of each customer record|
02|This line contains address details|for a customer|
03|This is a transaction line|with statement information|
99|This is the trailer record|
Does Talend 3.x component supports the above requirement (multiple record types / hierarchical files) to parse the file.
Quick reply would be appreciated as this is an urgent requirement.
Thanks...
Five Stars

Re: Hierarchical/multiple record type flat files

Adding support for standard EDI formats like HL7 and 837/835 would probably attract more customers to Talend. They are a little behind with regard to these formats, which the medical industry has been using for many years.
- Brian
One Star

Re: Hierarchical/multiple record type flat files

Hi techinfo.forum80,
currently Talend does not support such files . But you could use a workaround:
Read your file line by line (if it is line based) and extract only the information needed to know which type of structure you have. In your case the first number. Than you could split the stream in tMap based on this number. Because they are processed in a predefined order you could save information which you get from the header for example in a context variable and access this value in your detailed data flow.
Bye
Volker
One Star

Re: Hierarchical/multiple record type flat files

I am new to using TOS and one of the things I am looking at doing is reading a flat file with multiple formats in the same file.
I have tried creating a job with the example shown in Use Case 15, and have run into two issues and I have unsuccessfully looked in the user documentation to resolve this.
1) I get an error on the context variables defined in the tJavaRow component:
Error in the component's properties:context.customerNum cannot be resolved or is not a field
row2.customerNum cannot be resolved or is not a field
context.customerName cannot be resolved or is not a field
row2.customerName cannot be resolved or is not a field
How do I resolve this? This was not clear in the Use Case where or how the context variables are defined.
2) If I do not add the context variable in the tJavaRow component, I get the following error message for all the rows in my test file:
Line doesn't match: C;1;Mr. Smith
Line doesn't match: O;1;My first order
Line doesn't match: I;Potatoes:5:brown
Line doesn't match: I;Turkey:1:frozen
Line doesn't match: O;2;Mr. Smith's second order
Line doesn't match: I;Anythng:1Smiley Surprisednly one
Line doesn't match: C;2;Mr. Jones
Line doesn't match: O;3;Mr Jones's first order
Line doesn't match: I;Fruits:50:fresh
Line doesn't match: I;Cake:2:Large
Line doesn't match: I;Tea:10:with fruit
Line doesn't match: O;4;Mr. Jones's second order
Line doesn't match: I;Book:1:Easy Cook Book
Line doesn't match: I;Knife:1Smiley Frustratedharp
Line doesn't match: O;5;Another order for Mr. Jones
Line doesn't match: I;Book:1:Cooking made Easy
Line doesn't match: C;3;Mrs. Apple
Line doesn't match: C;4;Mrs. Frey
Line doesn't match: O;6;Only order for Mrs. Frey
Line doesn't match: I;Banana:2:Ripe and Yellow - No Brown spots!
Line doesn't match: I;Apple:5:Golden Delicious
Line doesn't match: I;Chocolate Bar:2:With Almonds

I have followed the example in Use Case 15 exactly, with no success and there is not much documentation regarding multiple formats in the same file Smiley Sad.
I'd appreciate any help with this.
Thanks
Debbie