How to add header and trailer in a file?

How to add header and trailer in a file?
Header - column names
Trailer - count of the records

Showing Answers 1 - 2 of 2 Answers


  • Mar 24th, 2020

There should be three input files created. one is Header file, second file is Body and the third file is the trailer. you should have three files connected to the concatenate component as inputs and it will produce the o/p file as expected.

  Was this answer useful?  Yes


  • May 25th, 2021

i/p file --> replicate --> 2 out ports -- one with data and secnd connected to rollup with no key and a count() function this gives the trailer record. Bring this flow back to a concat component as last port. First port of the concat compnent should be a file with header or create record compnent with header and secnd flow should be the data flow as stated earlier. COncat will join the records in the input port order. So output will be header, data and trailer with total number of records.
Pretty standard way.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions