<?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 Send different tRestResponse if no rows returned from database in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Send-different-tRestResponse-if-no-rows-returned-from-database/m-p/2219839#M14474</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Hopefully this is a straight forward question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a very simply job that take a rest request and queries a database to return a dataset and outputs the data as a rest response. I simply want to check to see if any rows have been returned from the database first and if not send a different rest response. Screen shot attached&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I m a beginner here so any and information or examples would be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 06:45:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T06:45:00Z</dc:date>
    <item>
      <title>Send different tRestResponse if no rows returned from database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Send-different-tRestResponse-if-no-rows-returned-from-database/m-p/2219839#M14474</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Hopefully this is a straight forward question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a very simply job that take a rest request and queries a database to return a dataset and outputs the data as a rest response. I simply want to check to see if any rows have been returned from the database first and if not send a different rest response. Screen shot attached&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I m a beginner here so any and information or examples would be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 06:45:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Send-different-tRestResponse-if-no-rows-returned-from-database/m-p/2219839#M14474</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T06:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Send different tRestResponse if no rows returned from database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Send-different-tRestResponse-if-no-rows-returned-from-database/m-p/2219840#M14475</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;you could use RunIf triggers for any number of conditions and prepare different responses depending from condition:&lt;/P&gt; 
&lt;P&gt;- if count &amp;gt; 0&lt;/P&gt; 
&lt;P&gt;- if count = 0&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;for example below, it returns&amp;nbsp;an error if account not found, tJavaFlex - put conditions into variables&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-01-27 at 12.43.32 AM.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M2bv.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135799i47B5DD73C8F789DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M2bv.png" alt="0683p000009M2bv.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jan 2019 11:48:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Send-different-tRestResponse-if-no-rows-returned-from-database/m-p/2219840#M14475</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2019-01-26T11:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Send different tRestResponse if no rows returned from database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Send-different-tRestResponse-if-no-rows-returned-from-database/m-p/2219841#M14476</link>
      <description>Do you have examples of what you put in the tJavaFlex (CheckStatus) components?</description>
      <pubDate>Wed, 30 Jan 2019 16:34:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Send-different-tRestResponse-if-no-rows-returned-from-database/m-p/2219841#M14476</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-30T16:34:22Z</dc:date>
    </item>
  </channel>
</rss>

