To add Header & Trailer records

I have a requirement to add header and trailer records to a text file before writing to a server.

Can any one guide me how to achieve this functionality.


@spunyala use copy snap then connect header snap in one output view and use tail to another outputview of copy. Then use union snap and write to a file.

Can you give a concrete example of what you’re trying to do? Do you have a FileReader snap that is reading the text file and then you want to add the header and trailer around the stream? For example, if the text file contained:

Hello, World!

You want the output to look like the following:

BEGIN Header
Hello, World!
END Trailer

How big is the file?

Hi ,

I am reading the data into text file from Successfactors and writing to the server.
So i need to write the data as below.
H(Header) which contains xxxx|yyyy|current date
Data records …
T(Tail record) which contains xxxx|total data records count


File may have around 11 k records…

Reading the data from file reader, doing some data conversions, using CSV formatter and writing it to the file with file writer