<?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 How do I create a flow for no records found? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-do-I-create-a-flow-for-no-records-found/m-p/2310301#M81440</link>
    <description>&lt;P&gt;Hello. I have a simple REST API that has 2 main responses. A response for a record found (200) and a response when no records are found (490). I can't get the 490 response to trigger. The 200 works when the DBInput returns results. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead of getting a 490, I get a 404 (which I don't program). I think this suggests the application just fails after the query or at the map flow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What kind of logic / componenets should I have in place to handle flows when no results are returned from the query? &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some screenshots are below to show what I have in place for logic. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000SqagsAAB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158095iCC927CF47786FF40/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000SqagsAAB.png" alt="0695b00000SqagsAAB.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000SqaiZAAR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151160i279794C3C6F4DCEE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000SqaiZAAR.png" alt="0695b00000SqaiZAAR.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000SqaioAAB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148362iA156F4D543940E01/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000SqaioAAB.png" alt="0695b00000SqaioAAB.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000SqaiyAAB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139278i2F679FEFA33921FF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000SqaiyAAB.png" alt="0695b00000SqaiyAAB.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 22:47:09 GMT</pubDate>
    <dc:creator>Dave5</dc:creator>
    <dc:date>2024-11-15T22:47:09Z</dc:date>
    <item>
      <title>How do I create a flow for no records found?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-do-I-create-a-flow-for-no-records-found/m-p/2310301#M81440</link>
      <description>&lt;P&gt;Hello. I have a simple REST API that has 2 main responses. A response for a record found (200) and a response when no records are found (490). I can't get the 490 response to trigger. The 200 works when the DBInput returns results. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead of getting a 490, I get a 404 (which I don't program). I think this suggests the application just fails after the query or at the map flow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What kind of logic / componenets should I have in place to handle flows when no results are returned from the query? &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some screenshots are below to show what I have in place for logic. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000SqagsAAB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158095iCC927CF47786FF40/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000SqagsAAB.png" alt="0695b00000SqagsAAB.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000SqaiZAAR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151160i279794C3C6F4DCEE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000SqaiZAAR.png" alt="0695b00000SqaiZAAR.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000SqaioAAB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148362iA156F4D543940E01/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000SqaioAAB.png" alt="0695b00000SqaioAAB.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000SqaiyAAB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139278i2F679FEFA33921FF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000SqaiyAAB.png" alt="0695b00000SqaiyAAB.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 22:47:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-do-I-create-a-flow-for-no-records-found/m-p/2310301#M81440</guid>
      <dc:creator>Dave5</dc:creator>
      <dc:date>2024-11-15T22:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a flow for no records found?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-do-I-create-a-flow-for-no-records-found/m-p/2310302#M81441</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;If there is no records, the components after tOracleInput will not be triggered. The workaround is to query the data and cache the into memory, and use runIf connector to trigger different subjobs.&lt;/P&gt;&lt;P&gt;eg:&lt;/P&gt;&lt;P&gt;.....tOracleInput1--main--tHashOutput1--runif1--&amp;gt;tHashInput1--tMap1--tRestResponse1&lt;/P&gt;&lt;P&gt;*********************************************** --runIf2--&amp;gt;tfixedFlowInput--tMap2--tRestResponse2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Set the condition of runIf1 as:&lt;/P&gt;&lt;P&gt;((Integer)globalMap.get("tDBInput_1_NB_LINE"))&amp;gt;0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Set the condition of runIf2 as:&lt;/P&gt;&lt;P&gt;((Integer)globalMap.get("tDBInput_1_NB_LINE"))=0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tfixedFlowInput: define the customized message and map it on tMap2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try and let me know if you any questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2022 03:18:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-do-I-create-a-flow-for-no-records-found/m-p/2310302#M81441</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-28T03:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a flow for no records found?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-do-I-create-a-flow-for-no-records-found/m-p/2310303#M81442</link>
      <description>&lt;P&gt;I appreciate the information and advice you have shared.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2022 07:05:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-do-I-create-a-flow-for-no-records-found/m-p/2310303#M81442</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-28T07:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a flow for no records found?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-do-I-create-a-flow-for-no-records-found/m-p/2310304#M81443</link>
      <description>&lt;P&gt;Hey @Shicong Hong​&amp;nbsp;! Thank you for the reply. This solution sounds promising. I'm a little confused still because I am not what components I should be using after the run-if statments. The options seem very limited. (see below). Could I ask for a little more direction on that please?  &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000SqgA9AAJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155733i4E7F27AD1D541F1C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000SqgA9AAJ.png" alt="0695b00000SqgA9AAJ.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2022 12:14:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-do-I-create-a-flow-for-no-records-found/m-p/2310304#M81443</guid>
      <dc:creator>Dave5</dc:creator>
      <dc:date>2022-06-28T12:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a flow for no records found?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-do-I-create-a-flow-for-no-records-found/m-p/2310305#M81444</link>
      <description>&lt;P&gt;I have gave an example job in my previous post, if you don't find tHashxxx component, please refer to this &lt;A href="https://help.talend.com/r/en-US/8.0/technical/where-can-i-find-thashinput-thashoutput-components" alt="https://help.talend.com/r/en-US/8.0/technical/where-can-i-find-thashinput-thashoutput-components" target="_blank"&gt;page&lt;/A&gt; to learn how show them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2022 12:30:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-do-I-create-a-flow-for-no-records-found/m-p/2310305#M81444</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-28T12:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a flow for no records found?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-do-I-create-a-flow-for-no-records-found/m-p/2310306#M81445</link>
      <description>&lt;P&gt;Thanks. I was able to find the tHash with that link!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There seems to be an issue though with the logic used in the first if statement. I can't seem to make that work. Does anything jump out to you in these screenshots? &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate the help. I'm still very new to Talend.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000SqkxoAAB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132353i177D4416A796B457/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000SqkxoAAB.png" alt="0695b00000SqkxoAAB.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000SqkxUAAR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/149162iA99B64E1540E7B54/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000SqkxUAAR.png" alt="0695b00000SqkxUAAR.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2022 20:16:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-do-I-create-a-flow-for-no-records-found/m-p/2310306#M81445</guid>
      <dc:creator>Dave5</dc:creator>
      <dc:date>2022-06-28T20:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a flow for no records found?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-do-I-create-a-flow-for-no-records-found/m-p/2310307#M81446</link>
      <description>&lt;P&gt;I found these small syntax changes worked. I removed extra brackets, and changed the arythmatic logic slightly. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Integer)globalMap.get("tDBInput_1_NB_LINE")&amp;gt;=1&lt;/P&gt;&lt;P&gt;(Integer)globalMap.get("tDBInput_1_NB_LINE")&amp;lt;=0&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 13:27:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-do-I-create-a-flow-for-no-records-found/m-p/2310307#M81446</guid>
      <dc:creator>Dave5</dc:creator>
      <dc:date>2022-06-29T13:27:48Z</dc:date>
    </item>
  </channel>
</rss>

