<?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: Header and Footer in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Header-and-Footer/m-p/2215470#M11874</link>
    <description>&lt;P&gt;Did this help?&lt;/P&gt;&lt;P&gt;If so, thanks to mark your case as solved (Kudos also accepted).&lt;/P&gt;</description>
    <pubDate>Thu, 27 Feb 2020 07:45:05 GMT</pubDate>
    <dc:creator>TRF</dc:creator>
    <dc:date>2020-02-27T07:45:05Z</dc:date>
    <item>
      <title>Header and Footer</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Header-and-Footer/m-p/2215466#M11870</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I created a file in tjavarow the code is below:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;File OutputFile= new File(context.main_path + "\\Successful\\" + (((String)globalMap.get("tWaitForFile_1_FILENAME")).split("\\.",2))[0] + ".csv");&lt;/P&gt; 
&lt;P&gt;if (OutputFile.createNewFile()){&lt;BR /&gt;System.out.println("File is created!");&lt;BR /&gt;}else{&lt;BR /&gt;System.out.println("File already exists!");&lt;BR /&gt;}&lt;/P&gt; 
&lt;P&gt;FileWriter writer = new FileWriter(OutputFile);&lt;BR /&gt;writer.write(input_row.anumber + "~" +input_row.bnumber + "~");&lt;BR /&gt;writer.close();&lt;/P&gt; 
&lt;P&gt;Now I want to put a header with the name of the file and a footer with the total rows. Also it prints only one row from the 23 rows. How can I write them all ? Please help me .&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 06:26:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Header-and-Footer/m-p/2215466#M11870</guid>
      <dc:creator>DrGenious</dc:creator>
      <dc:date>2020-02-26T06:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Header and Footer</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Header-and-Footer/m-p/2215467#M11871</link>
      <description>Use tJavaFlex instead of tJavaRow.&lt;BR /&gt;Start part will start once with the subjob and will be used to create the file and write the header Line.&lt;BR /&gt;Main part will start for each row and will be used to write content.&lt;BR /&gt;End part will start once when the subjob ends and will be used to write the foirer Line.</description>
      <pubDate>Wed, 26 Feb 2020 07:03:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Header-and-Footer/m-p/2215467#M11871</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2020-02-26T07:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Header and Footer</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Header-and-Footer/m-p/2215468#M11872</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can tjavaflex read input_row ? Also&amp;nbsp; I dont know how to write the header and the footer. Is it possible to show me?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 07:39:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Header-and-Footer/m-p/2215468#M11872</guid>
      <dc:creator>DrGenious</dc:creator>
      <dc:date>2020-02-26T07:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Header and Footer</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Header-and-Footer/m-p/2215469#M11873</link>
      <description>&lt;P&gt;Use standard row names such as row1, row2 and so on instead of input_row/output_row.&lt;/P&gt; 
&lt;P&gt;For the header, something like this should work:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;writer.write((((String)globalMap.get("tWaitForFile_1_FILENAME")).split("\\.",2))[0] + ".csv");&lt;BR /&gt;// declare line counter&lt;BR /&gt;int counter = 0;&lt;BR /&gt;// don't close the file&lt;BR /&gt;// writer.close();&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In the main part, add 1 to the counter and write the content of current row:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;counter++;&lt;BR /&gt;// write content&lt;BR /&gt;writer.write(row1.&lt;SPAN&gt;anumber &lt;/SPAN&gt;+ "~" row1.b&lt;SPAN&gt;number&lt;/SPAN&gt; + "~" + row1.whatYouWant + "~" + "...and so on...");&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Then in the footer you can write the counter value and close the output file:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;writer.write("" + counter);&lt;BR /&gt;writer.close();&lt;/PRE&gt; 
&lt;P&gt;This should be ok for your use case (or not too far, I didn't try it).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 08:04:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Header-and-Footer/m-p/2215469#M11873</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2020-02-26T08:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Header and Footer</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Header-and-Footer/m-p/2215470#M11874</link>
      <description>&lt;P&gt;Did this help?&lt;/P&gt;&lt;P&gt;If so, thanks to mark your case as solved (Kudos also accepted).&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 07:45:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Header-and-Footer/m-p/2215470#M11874</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2020-02-27T07:45:05Z</dc:date>
    </item>
  </channel>
</rss>

