<?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: display message in console when no rows in output file in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/display-message-in-console-when-no-rows-in-output-file/m-p/2219453#M14248</link>
    <description>or you could use If links, like in the first attached picture&lt;BR /&gt;Note: the "System.out.println("***tJava_#***");" lines were just to show you which tJava_# the summary line printed from, and wouldn't be necessary in your solution&lt;BR /&gt;&lt;B&gt;If (order:1)&lt;/B&gt;&lt;BR /&gt;&lt;PRE&gt;((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")).equals(0)&lt;/PRE&gt;&lt;BR /&gt;&lt;B&gt;tJava_1&lt;/B&gt;&lt;BR /&gt;&lt;PRE&gt;System.out.println("");&lt;BR /&gt;System.out.println("***tJava_1***");&lt;BR /&gt;System.out.println("There are no rows.");&lt;BR /&gt;System.out.println("");&lt;/PRE&gt;&lt;BR /&gt;&lt;B&gt;If (order:2)&lt;/B&gt;&lt;BR /&gt;&lt;PRE&gt;((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")).equals(1)&lt;/PRE&gt;&lt;BR /&gt;&lt;B&gt;tJava_2&lt;/B&gt;&lt;BR /&gt;&lt;PRE&gt;System.out.println("");&lt;BR /&gt;System.out.println("***tJava_2***");&lt;BR /&gt;System.out.println("There is " + ((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")) + "row.");&lt;BR /&gt;System.out.println("");&lt;/PRE&gt;&lt;BR /&gt;&lt;B&gt;If (order:3)&lt;/B&gt;&lt;BR /&gt;&lt;PRE&gt;((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")) &amp;gt; 1&lt;/PRE&gt;&lt;BR /&gt;&lt;B&gt;tJava_3&lt;/B&gt;&lt;BR /&gt;&lt;PRE&gt;System.out.println("");&lt;BR /&gt;System.out.println("***tJava_3***");&lt;BR /&gt;System.out.println("There are " + ((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")) + " rows.");&lt;BR /&gt;System.out.println("");&lt;/PRE&gt;</description>
    <pubDate>Wed, 27 Aug 2008 20:29:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-08-27T20:29:04Z</dc:date>
    <item>
      <title>display message in console when no rows in output file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/display-message-in-console-when-no-rows-in-output-file/m-p/2219450#M14245</link>
      <description>Hello,
&lt;BR /&gt;I would wand to know how I can control the number of rows of a file. When there is no row it displays in the console "There is no row" and if there are rows I want to display "there is (number of rows)rows"
&lt;BR /&gt;regards,
&lt;BR /&gt; JOLLYJOHN</description>
      <pubDate>Sat, 16 Nov 2024 14:15:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/display-message-in-console-when-no-rows-in-output-file/m-p/2219450#M14245</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T14:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: display message in console when no rows in output file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/display-message-in-console-when-no-rows-in-output-file/m-p/2219451#M14246</link>
      <description>Hello,
&lt;BR /&gt;
&lt;BR /&gt;well in the place of the tLogRow we can use a tJava  to display the value of global variable from components with the commande System.out.println();
&lt;BR /&gt;
&lt;BR /&gt;for example like this code :
&lt;BR /&gt;
&lt;BR /&gt;System.out.println(((Integer)globalMap.get("tRowGenerator_1_NB_LINE")));
&lt;BR /&gt;
&lt;BR /&gt;Best Regards
&lt;BR /&gt;
&lt;BR /&gt;Jeremie</description>
      <pubDate>Wed, 27 Aug 2008 10:09:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/display-message-in-console-when-no-rows-in-output-file/m-p/2219451#M14246</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-08-27T10:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: display message in console when no rows in output file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/display-message-in-console-when-no-rows-in-output-file/m-p/2219452#M14247</link>
      <description>you can use a tJava component, and connect it to your database component via a "On Subjob Ok" link
&lt;BR /&gt;in tJava you could use something like this:
&lt;BR /&gt;
&lt;PRE&gt;if(((Integer)globalMap.get("tFileOutputExcel_1_NB_LINE")).equals(0)) {&lt;BR /&gt;System.out.println("There are no rows."); &lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;System.out.println("There are " + ((Integer)globalMap.get("tFileOutputExcel_1_NB_LINE")) + " rows.");&lt;BR /&gt;}&lt;/PRE&gt;
&lt;BR /&gt;or, to make it grammatically correct, and easier to read:
&lt;BR /&gt;
&lt;PRE&gt;System.out.println("");&lt;BR /&gt;if( ((Integer)globalMap.get("tFileOutputExcel_1_NB_LINE")).equals(0) ) {&lt;BR /&gt;System.out.println("There are 0 rows."); &lt;BR /&gt;}&lt;BR /&gt;else if( ((Integer)globalMap.get("tFileOutputExcel_1_NB_LINE")).equals(1) ) {&lt;BR /&gt;System.out.println("There is " + ((Integer)globalMap.get("tFileOutputExcel_1_NB_LINE")) + "row.");&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;System.out.println("There are " + ((Integer)globalMap.get("tFileOutputExcel_1_NB_LINE")) + " rows.");&lt;BR /&gt;}&lt;BR /&gt;System.out.println("");&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Aug 2008 20:14:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/display-message-in-console-when-no-rows-in-output-file/m-p/2219452#M14247</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-08-27T20:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: display message in console when no rows in output file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/display-message-in-console-when-no-rows-in-output-file/m-p/2219453#M14248</link>
      <description>or you could use If links, like in the first attached picture&lt;BR /&gt;Note: the "System.out.println("***tJava_#***");" lines were just to show you which tJava_# the summary line printed from, and wouldn't be necessary in your solution&lt;BR /&gt;&lt;B&gt;If (order:1)&lt;/B&gt;&lt;BR /&gt;&lt;PRE&gt;((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")).equals(0)&lt;/PRE&gt;&lt;BR /&gt;&lt;B&gt;tJava_1&lt;/B&gt;&lt;BR /&gt;&lt;PRE&gt;System.out.println("");&lt;BR /&gt;System.out.println("***tJava_1***");&lt;BR /&gt;System.out.println("There are no rows.");&lt;BR /&gt;System.out.println("");&lt;/PRE&gt;&lt;BR /&gt;&lt;B&gt;If (order:2)&lt;/B&gt;&lt;BR /&gt;&lt;PRE&gt;((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")).equals(1)&lt;/PRE&gt;&lt;BR /&gt;&lt;B&gt;tJava_2&lt;/B&gt;&lt;BR /&gt;&lt;PRE&gt;System.out.println("");&lt;BR /&gt;System.out.println("***tJava_2***");&lt;BR /&gt;System.out.println("There is " + ((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")) + "row.");&lt;BR /&gt;System.out.println("");&lt;/PRE&gt;&lt;BR /&gt;&lt;B&gt;If (order:3)&lt;/B&gt;&lt;BR /&gt;&lt;PRE&gt;((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")) &amp;gt; 1&lt;/PRE&gt;&lt;BR /&gt;&lt;B&gt;tJava_3&lt;/B&gt;&lt;BR /&gt;&lt;PRE&gt;System.out.println("");&lt;BR /&gt;System.out.println("***tJava_3***");&lt;BR /&gt;System.out.println("There are " + ((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")) + " rows.");&lt;BR /&gt;System.out.println("");&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Aug 2008 20:29:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/display-message-in-console-when-no-rows-in-output-file/m-p/2219453#M14248</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-08-27T20:29:04Z</dc:date>
    </item>
  </channel>
</rss>

