Page 1 of 1

Combine trailer record to output file

Posted: Wed Oct 24, 2007 5:44 am
by Marley777
:?

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!!!

Posted: Wed Oct 24, 2007 6:02 am
by lfong
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!

Posted: Wed Oct 24, 2007 6:14 am
by Marley777
Hi Ifong, thanks for reading. At the end of the day I still should have a file with detial records and a trailer record containing counts. The record formats for the two will never be the same. I'm not sure how the funnel stage will work in your example? Could you please elaborate. Thank you!!!!

Posted: Wed Oct 24, 2007 6:25 am
by lfong
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.

Posted: Wed Oct 24, 2007 1:47 pm
by jdmiceli
ADMINISTRATOR: please move this topic to the Parallel forum!