
Anonymous
Not applicable
2020-03-30
02:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to split a file into header and details
I am working with a csv file that I would like to split into two tables of header and details. An Invoice would be a good example of this where there are multiple invoice headers and each invoice header has multiple line items. However, in the original source file the header information repeats for all of its lines.
Original File
- Header_UniqueID
- Header_SellerName
- Header_BuyerName
- Line_UniqueID
- Line_Item
- Line_QTY
- Line_Price
Output
- Header Table
- Header_UniqueID
- Header_SellerName
- Header_BuyerName
- Line Table
- Line_UniqueID
- Header_UniqueID (reference to record in the header table)
- Line_Item
- Line_QTY
- Line_Price
I've searched the other forum posts, but not finding what I was looking for, but maybe im not using the correct working in my searches. I've also looked at the tNormalize/Demormalize components, but I dont think that is what I need either.
168 Views
1 Reply

Champion II
2020-03-30
03:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use a tMap with 2 output flows, 1 for headers and 1 for lignes.
Connect 1rst output flow to a tUniqRow to eliminate duplicates, then to the desired output file or table.
Connect the 2nd output flow to the desired output file or table.
Connect 1rst output flow to a tUniqRow to eliminate duplicates, then to the desired output file or table.
Connect the 2nd output flow to the desired output file or table.
168 Views
