<?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 to iterate through a Date table? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-iterate-through-a-Date-table/m-p/2525725#M147824</link>
    <description>&lt;P&gt;Hi everyone,&lt;BR /&gt;I have two tables,&amp;nbsp;&lt;EM&gt;sales lines&lt;/EM&gt; and&lt;EM&gt; item execption&lt;/EM&gt; (see below).&lt;/P&gt;&lt;P&gt;Now I want to compre if an item from sales line is in exception table and if the posting date is between valid_from and valid_to. I used a tmap and did a look up from sales table item_no to exception table item_no.&lt;/P&gt;&lt;P&gt;Then I created a flag where I compared the interval at the output side.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;row1.item_no != null &amp;amp;&amp;amp;&lt;BR /&gt;((TalendDate.compareDate(row1.posting_date , row2.valid_from) ==1 || TalendDate.compareDate(row1.posting_date , row2.valid_to) ==0) &amp;amp;&amp;amp; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;(TalendDate.compareDate(row1.posting_date , row2.valid_to) == -1 || TalendDate.compareDate(row1.posting_date , row2.valid_to) ==0)) ? 1 : 0 &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;My issue now:&amp;nbsp;sales0003, item abc, output = 0 but must be 1.&lt;/P&gt;&lt;P&gt;I already checked the Lookup Model in &lt;EM&gt;item exception = load for every line, Match Model = all&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why the output is still 0 for sales line? It seems that always the first record of lookup table is checked.&lt;/P&gt;&lt;P&gt;How I can solve this issue?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pawe84_0-1753878794900.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/182425iADBBD64BB21D07A6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pawe84_0-1753878794900.png" alt="pawe84_0-1753878794900.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pawe84_1-1753878803627.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/182426i27E6AEEFD72BAFF6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pawe84_1-1753878803627.png" alt="pawe84_1-1753878803627.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks for any hints.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Jul 2025 12:33:35 GMT</pubDate>
    <dc:creator>pawe84</dc:creator>
    <dc:date>2025-07-30T12:33:35Z</dc:date>
    <item>
      <title>How to iterate through a Date table?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-iterate-through-a-Date-table/m-p/2525725#M147824</link>
      <description>&lt;P&gt;Hi everyone,&lt;BR /&gt;I have two tables,&amp;nbsp;&lt;EM&gt;sales lines&lt;/EM&gt; and&lt;EM&gt; item execption&lt;/EM&gt; (see below).&lt;/P&gt;&lt;P&gt;Now I want to compre if an item from sales line is in exception table and if the posting date is between valid_from and valid_to. I used a tmap and did a look up from sales table item_no to exception table item_no.&lt;/P&gt;&lt;P&gt;Then I created a flag where I compared the interval at the output side.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;row1.item_no != null &amp;amp;&amp;amp;&lt;BR /&gt;((TalendDate.compareDate(row1.posting_date , row2.valid_from) ==1 || TalendDate.compareDate(row1.posting_date , row2.valid_to) ==0) &amp;amp;&amp;amp; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;(TalendDate.compareDate(row1.posting_date , row2.valid_to) == -1 || TalendDate.compareDate(row1.posting_date , row2.valid_to) ==0)) ? 1 : 0 &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;My issue now:&amp;nbsp;sales0003, item abc, output = 0 but must be 1.&lt;/P&gt;&lt;P&gt;I already checked the Lookup Model in &lt;EM&gt;item exception = load for every line, Match Model = all&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why the output is still 0 for sales line? It seems that always the first record of lookup table is checked.&lt;/P&gt;&lt;P&gt;How I can solve this issue?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pawe84_0-1753878794900.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/182425iADBBD64BB21D07A6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pawe84_0-1753878794900.png" alt="pawe84_0-1753878794900.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pawe84_1-1753878803627.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/182426i27E6AEEFD72BAFF6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pawe84_1-1753878803627.png" alt="pawe84_1-1753878803627.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks for any hints.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2025 12:33:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-iterate-through-a-Date-table/m-p/2525725#M147824</guid>
      <dc:creator>pawe84</dc:creator>
      <dc:date>2025-07-30T12:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to iterate through a Date table?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-iterate-through-a-Date-table/m-p/2525835#M147831</link>
      <description>&lt;P&gt;Now I got the solution. You have to add after tmap the component taggregate and aggregate the flag to max(flag) then you'll get for n-input lines the exact n-output lines and the flag value is shown correctly.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2025 10:48:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-iterate-through-a-Date-table/m-p/2525835#M147831</guid>
      <dc:creator>pawe84</dc:creator>
      <dc:date>2025-07-31T10:48:59Z</dc:date>
    </item>
  </channel>
</rss>

