[resolved] How to add header And Trailer for file

One Star

[resolved] How to add header And Trailer for file

Hi All,
I need some help in adding Header and Trailer to output file.
In my header i need to add date and in trailer i need to add total number of records processed.
EX:
Header
Type:Insert
code:Insus
Date:20140512
Body
srno,name,city
1,jan,Ind
2,Mak,Us
Trailer
records_inserted:2
Please help me on this
Thanks in advance
Rajesh
Five Stars

Re: [resolved] How to add header And Trailer for file

split job in three segment,
in first add Header part, using write full row. 
then your main job will add schema wise details. 
at last add trailer using full row. instead of schema. 
Moderator

Re: [resolved] How to add header And Trailer for file

Hi,
Please take a look at related forums:
http://www.talendforge.org/forum/viewtopic.php?id=13578 and http://www.talendforge.org/forum/viewtopic.php?id=35064.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.