-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Keith Martin edited this page Jul 9, 2017
·
4 revisions
This SSIS component is designed to take a text file and spit it out into multiple outputs.
You have a text file that has a code at the start of each line that describes what else is on that line. Each field on the file is separated with the pipe character.
- 001 is the start of an invoice header
- 002 is a header record
- 003 is a child of a header record, and is the items on an invoice
- 004 is the payment details of an invoice.
eg.
001|12345|Start Invoice Record
002|2001-01-01|Joe Bloggs|Header Record
003|15.00|1.00|Purchase of 15 $1 Items|Data Record
003|16.00|1.00|Purchase of 16 $1 Items|Data Record
003|17.00|1.00|Purchase of 17 $1 Items|Data Record
003|18.00|1.00|Purchase of 18 $1 Items|Data Record
004|66.00|2004-01-01|1234567890156|CreditCard|Approved|Payment Record
001|12346|2nd Start Invoice Record
002|2001-01-02|Joe Bloggs|Header Record
003|165.50|0.75|Purchase of 165.5 meters of rope at 75c per meter|Data Record
004|124.13|2004-01-01|1234567890156|CreditCard|Approved|Payment Record
001|12347|3rd Start Invoice Record
003|95.00|2.00|Purchase of 95 $2 items|Data Record Minus Header Record (OK)
004|190.00|2004-01-01|1234567890156|CreditCard|Approved|Payment Record
This component will take the input file above, and enable you to have 4 outputs, which know which invoice the records belong to.
There is an identifier column added to each output to enable joining the data back up.