Combine trailer record to output file
Moderators: chulett, rschirm, roy
Combine trailer record to output file
Hi, I have a transformer stage that has 2 output links. Each link has different metadata because one link is a trailer record containing various counts derived in the transformer during processing. I only right the trailer record once at the end of processing. How can I bring the 2 links together in one output file? I tried a funnel stage, but the links don't have the same columns.
Thanks for your time!!!
Create a generic layout with the length of the longest record.
Use the column export stage for both records. This will export all columns from your header and detail records to the generic file layout you created.
Then you can use your funnel stage.
Make sure you specify the link order to get your header record first on the funnel stage.
Cheers!
Use the column export stage for both records. This will export all columns from your header and detail records to the generic file layout you created.
Then you can use your funnel stage.
Make sure you specify the link order to get your header record first on the funnel stage.
Cheers!
The column export stage allows you to take multiple colums and export them into one larger column.
Example:
If you define a generic layout of char(200), the column export stage will concatenate all the columns you select into the generic layout you have created. If you do this for both your detail and trailer records you will have two identical records to go into your funnel stage.
Go into the help real quick and do a search on column export stage. It will explain it in more detail how to set it up. I'm giving you a readers digest version on how the stage works and setting it up.
Example:
If you define a generic layout of char(200), the column export stage will concatenate all the columns you select into the generic layout you have created. If you do this for both your detail and trailer records you will have two identical records to go into your funnel stage.
Go into the help real quick and do a search on column export stage. It will explain it in more detail how to set it up. I'm giving you a readers digest version on how the stage works and setting it up.