Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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.
Labels (2)
7 Replies
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

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...
briansms
Contributor
Contributor

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
Anonymous
Not applicable
Author

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
Debbie_B
Contributor
Contributor

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:1 0683p000009MA5A.pngnly 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:1 0683p000009M9p6.pngharp
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 0683p000009MPcz.png.
I'd appreciate any help with this.
Thanks
Debbie
jathomas
Contributor
Contributor

I have slightly improved the solution provided in Use case 15 (http://www.talendforge.org/wiki/doku.php?id=use_case:15) by replacing tFileInput, tMap and tExtractDelimitedFields with a single tFileInputMSPositional component. Please see the attached screenshot. 


Usecase_15_Hierarchical_MS.PNG