<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Adding File Header &amp; Trailer in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Adding-File-Header-Trailer/m-p/2281340#M55904</link>
    <description>Hi Neeraj,
&lt;BR /&gt;One way of achieving this is to have three sub jobs.
&lt;BR /&gt;The first sub job uses a Java flex component (tJavaFlex_1) to write the file header and header line to the output file (tFileOutputDelimited_1). The schema for row1 is a single field by the name LINE (String data type). This job writes both the file header and header line (field names) to the output file.
&lt;BR /&gt;The second sub job reads the Input file delimited component (tFileInputDelimited_1) and appends the records to the output file (tFileOutputDelimited_2) generated by the first sub job. The "Append" option in" Basic Settings" is enabled for the tFileOutputDelimited_2 component.
&lt;BR /&gt;The third sub job reads the global variable tFileOutputDelimited_2.NB_LINE to get the number of lines written to the output file (tFileOutputDelimited_2). This is then appended to the output file (tFileOutputDelimited_3). The schema for row3 is a single field by the name RECORD_COUNT (Integer data type). The "Append" option in" Basic Settings" is enabled for the tFileOutputDelimited_3 component.
&lt;BR /&gt;Since all the sub jobs are should be writing to the same file we need to use the "File Name" for tFileOutputDelimited_1, tFileOutputDelimited_2 and tFileOutputDelimited_3.
&lt;BR /&gt;Regards,
&lt;BR /&gt;Abhi</description>
    <pubDate>Sat, 25 Dec 2010 06:17:06 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-12-25T06:17:06Z</dc:date>
    <item>
      <title>Adding File Header &amp; Trailer</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-File-Header-Trailer/m-p/2281339#M55903</link>
      <description>Hi Guys,
&lt;BR /&gt;I am picking some data from an input csv &amp;amp; generating an output csv file.Now i want the desired output as
&lt;BR /&gt;File Header (FH): TEST, &amp;lt;sysdate&amp;gt;, &amp;lt;outputfilename&amp;gt;
&lt;BR /&gt;Header Line (HL): Contains the column header text
&lt;BR /&gt;Detail Line (DL): Values of fields mentioned in Header line 
&lt;BR /&gt;File Trailer (FT): Contains the- Total Records in the output file generated
&lt;BR /&gt;I am able to generate the Header Line &amp;amp; Detail line via parsing the csv from tfileinputdelimited &amp;amp; generating file in tfileoutputdelimited.
&lt;BR /&gt;How to add the File Header &amp;amp; File Trailer in the same file.Please help as i am badly stuck.
&lt;BR /&gt;Thanks,
&lt;BR /&gt;Neeraj</description>
      <pubDate>Sat, 16 Nov 2024 13:10:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-File-Header-Trailer/m-p/2281339#M55903</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Adding File Header &amp; Trailer</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-File-Header-Trailer/m-p/2281340#M55904</link>
      <description>Hi Neeraj,
&lt;BR /&gt;One way of achieving this is to have three sub jobs.
&lt;BR /&gt;The first sub job uses a Java flex component (tJavaFlex_1) to write the file header and header line to the output file (tFileOutputDelimited_1). The schema for row1 is a single field by the name LINE (String data type). This job writes both the file header and header line (field names) to the output file.
&lt;BR /&gt;The second sub job reads the Input file delimited component (tFileInputDelimited_1) and appends the records to the output file (tFileOutputDelimited_2) generated by the first sub job. The "Append" option in" Basic Settings" is enabled for the tFileOutputDelimited_2 component.
&lt;BR /&gt;The third sub job reads the global variable tFileOutputDelimited_2.NB_LINE to get the number of lines written to the output file (tFileOutputDelimited_2). This is then appended to the output file (tFileOutputDelimited_3). The schema for row3 is a single field by the name RECORD_COUNT (Integer data type). The "Append" option in" Basic Settings" is enabled for the tFileOutputDelimited_3 component.
&lt;BR /&gt;Since all the sub jobs are should be writing to the same file we need to use the "File Name" for tFileOutputDelimited_1, tFileOutputDelimited_2 and tFileOutputDelimited_3.
&lt;BR /&gt;Regards,
&lt;BR /&gt;Abhi</description>
      <pubDate>Sat, 25 Dec 2010 06:17:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-File-Header-Trailer/m-p/2281340#M55904</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-12-25T06:17:06Z</dc:date>
    </item>
  </channel>
</rss>

