<?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 Iterate From a SQL Server  Input query result (and Run components for each date ) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Iterate-From-a-SQL-Server-Input-query-result-and-Run-components/m-p/2209365#M8218</link>
    <description>&lt;P&gt;Good Day Everyone ,&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I'm new to talend and i'm having a bad time&amp;nbsp; trying to resolve this particular Issue and i would like to have the best advice i can , since i've been monkey-testing for 2 days without luck .&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I've got this process that needs to be skipped on holidays , and execute the holiday report on the next business or working day with the report that runs normally on non-holidays , no reports combined just running the report for each date&amp;nbsp; that was skipped , this is based&amp;nbsp; based on a date-flag stored on a sql server table.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Since there are times when there are consecutive days , such as 25 th and 26th December and cases like that ,i need to get a list of the days that are being skipped and execute them all on the next working day. I resolved the part of the dates needed through a tMSSqlinput which outputs all the dates that are going to be iterated ,&amp;nbsp; but i don't know how to fill a list and make the report iteration , modifying the&amp;nbsp;date variable , send the current value as an input , if i should use a tloop , a tforeach , or use tflowtoiterate to execute the report n times for each date before it finishes .&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;my flow so far is&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Connection --&amp;gt; validate if holiday&amp;nbsp; &lt;SPAN&gt;--&amp;gt; If no&amp;nbsp;&amp;nbsp;--&amp;gt; Check Yesterday&amp;nbsp;&amp;nbsp;--&amp;gt; get all dates that we're holiday&amp;nbsp;--&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;--&amp;gt; if yes Skip&amp;nbsp;&amp;nbsp;--&amp;gt; end&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;the next part of the job its the one i am&amp;nbsp; dealing&amp;nbsp;with after that the part i need to execute is.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;im guessing&amp;nbsp;it should be like this&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;SQL server Output Date List&amp;nbsp; &amp;nbsp;--&amp;gt; flowtoiterate&amp;nbsp;&amp;nbsp;--&amp;gt; tloop with for each date&amp;nbsp;&amp;nbsp;&amp;nbsp;--&amp;gt; and tflex maybe to increase or decrease the dates&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="talendjob.PNG" style="width: 438px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M0iv.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148210i7F846CDBD54DEB9A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M0iv.png" alt="0683p000009M0iv.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;the the part of the report that already works and generates the report but will be executed for each date&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tjobd2.PNG" style="width: 821px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M0k2.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130756iFAB9ABF4B110EE14/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M0k2.png" alt="0683p000009M0k2.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;Receive date input&amp;nbsp;--&amp;gt; process reports&amp;nbsp;--&amp;gt; Validation --&amp;gt; Send email&amp;nbsp;--&amp;gt; kill connection&amp;nbsp;--&amp;gt; End&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Any advice or suggestion would be appreciated since i don't know how it should be done with all the stuff I've&amp;nbsp;searched.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Oct 2018 15:50:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-10-29T15:50:24Z</dc:date>
    <item>
      <title>Iterate From a SQL Server  Input query result (and Run components for each date )</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-From-a-SQL-Server-Input-query-result-and-Run-components/m-p/2209365#M8218</link>
      <description>&lt;P&gt;Good Day Everyone ,&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I'm new to talend and i'm having a bad time&amp;nbsp; trying to resolve this particular Issue and i would like to have the best advice i can , since i've been monkey-testing for 2 days without luck .&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I've got this process that needs to be skipped on holidays , and execute the holiday report on the next business or working day with the report that runs normally on non-holidays , no reports combined just running the report for each date&amp;nbsp; that was skipped , this is based&amp;nbsp; based on a date-flag stored on a sql server table.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Since there are times when there are consecutive days , such as 25 th and 26th December and cases like that ,i need to get a list of the days that are being skipped and execute them all on the next working day. I resolved the part of the dates needed through a tMSSqlinput which outputs all the dates that are going to be iterated ,&amp;nbsp; but i don't know how to fill a list and make the report iteration , modifying the&amp;nbsp;date variable , send the current value as an input , if i should use a tloop , a tforeach , or use tflowtoiterate to execute the report n times for each date before it finishes .&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;my flow so far is&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Connection --&amp;gt; validate if holiday&amp;nbsp; &lt;SPAN&gt;--&amp;gt; If no&amp;nbsp;&amp;nbsp;--&amp;gt; Check Yesterday&amp;nbsp;&amp;nbsp;--&amp;gt; get all dates that we're holiday&amp;nbsp;--&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;--&amp;gt; if yes Skip&amp;nbsp;&amp;nbsp;--&amp;gt; end&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;the next part of the job its the one i am&amp;nbsp; dealing&amp;nbsp;with after that the part i need to execute is.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;im guessing&amp;nbsp;it should be like this&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;SQL server Output Date List&amp;nbsp; &amp;nbsp;--&amp;gt; flowtoiterate&amp;nbsp;&amp;nbsp;--&amp;gt; tloop with for each date&amp;nbsp;&amp;nbsp;&amp;nbsp;--&amp;gt; and tflex maybe to increase or decrease the dates&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="talendjob.PNG" style="width: 438px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M0iv.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148210i7F846CDBD54DEB9A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M0iv.png" alt="0683p000009M0iv.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;the the part of the report that already works and generates the report but will be executed for each date&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tjobd2.PNG" style="width: 821px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M0k2.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130756iFAB9ABF4B110EE14/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M0k2.png" alt="0683p000009M0k2.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;Receive date input&amp;nbsp;--&amp;gt; process reports&amp;nbsp;--&amp;gt; Validation --&amp;gt; Send email&amp;nbsp;--&amp;gt; kill connection&amp;nbsp;--&amp;gt; End&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Any advice or suggestion would be appreciated since i don't know how it should be done with all the stuff I've&amp;nbsp;searched.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 15:50:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-From-a-SQL-Server-Input-query-result-and-Run-components/m-p/2209365#M8218</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-29T15:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate From a SQL Server  Input query result (and Run components for each date )</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-From-a-SQL-Server-Input-query-result-and-Run-components/m-p/2209366#M8219</link>
      <description>&lt;P&gt;You're definitely on the right track here -- but you may just be over-thinking things a bit.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;first ensure your report job accepts the date to run as a context parameter.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;if you can return a list of dates to run the "holiday reports" with a database query (with one date to run per row), then you'd just need to use the following component flow to execute the report job once per date:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tMSSqlInput ---row---&amp;gt;tFlowToIterate---iterate---&amp;gt;tRunJob&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In the tRunJob component, you have a table where you can populate the values for context parameters. In the date to run context param, write the following to&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;retrieve the date from the query output:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;((Date)globalMap.get("row1.date_to_run"))&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This is assuming your tMSSqlInput has a schema column named "date_to_run" of type Date.&amp;nbsp;The tFlowToIterate component will create a global map key that you can retrieve for each column of your schema.This globalMap value will be updated once per row and will hold the value of the query output.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 20:29:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-From-a-SQL-Server-Input-query-result-and-Run-components/m-p/2209366#M8219</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-29T20:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate From a SQL Server  Input query result (and Run components for each date )</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-From-a-SQL-Server-Input-query-result-and-Run-components/m-p/2209367#M8220</link>
      <description>&lt;P&gt;thanks , that worked like a Charm , i'll cross my fingers that this works through Talend Administration Console&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 14:04:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-From-a-SQL-Server-Input-query-result-and-Run-components/m-p/2209367#M8220</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-31T14:04:59Z</dc:date>
    </item>
  </channel>
</rss>

