<?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: How to compare a date and a periode? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-compare-a-date-and-a-periode/m-p/2316313#M86875</link>
    <description>&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PersonneType.jpg" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrX5.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/140040i3ABDB3609E545B0B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrX5.jpg" alt="0683p000009LrX5.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Hi Julien,&lt;/P&gt; 
&lt;P&gt;I think a job like this one can do what you want, it uses "Var table" like ThWabi suggested.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Best regards.&lt;/P&gt; 
&lt;P&gt;TD (bon courage)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Nov 2017 13:01:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-11-07T13:01:34Z</dc:date>
    <item>
      <title>How to compare a date and a periode?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-compare-a-date-and-a-periode/m-p/2316310#M86872</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I&amp;nbsp;want to type a person according to a periode, so I need to compare between a date and a periode.&lt;/P&gt; 
&lt;P&gt;For exemple:&lt;/P&gt; 
&lt;P&gt;I have two tables&lt;/P&gt; 
&lt;P&gt;Table A&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.JPG" style="width: 577px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrQ5.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142546iC9D60FAA19B6B19E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrQ5.jpg" alt="0683p000009LrQ5.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Table B&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.JPG" style="width: 794px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrKF.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151737iA68A6BB39DD02722/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrKF.jpg" alt="0683p000009LrKF.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I want to have:&lt;/P&gt; 
&lt;P&gt;two first lines of Table A get type A&lt;/P&gt; 
&lt;P&gt;two last lines of Table A get type B&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;here date_debut means start date, date_fin means end date&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So I use tmap, at first time I try like that&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="5.JPG" style="width: 945px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrX3.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134335iF3F901C3E3BC3293/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrX3.jpg" alt="0683p000009LrX3.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Match model is unique match&lt;/P&gt; 
&lt;P&gt;But the result is&lt;/P&gt; 
&lt;P&gt;1|03-03-2017|||&lt;BR /&gt;1|04-03-2017|||&lt;BR /&gt;1|05-03-2017|05-03-2017||B&lt;BR /&gt;1|06-03-2017|05-03-2017||B&lt;/P&gt; 
&lt;P&gt;it dosent work on two first line&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Then I try to put the condition row1.id_pers==row2.id_pers in the expression zone, the match model becomes All rows&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="6.JPG" style="width: 968px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrX8.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150261i3D56F8C9E602A27C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrX8.jpg" alt="0683p000009LrX8.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Now it works, I get a correct result&lt;/P&gt; 
&lt;P&gt;1|03-03-2017|03-03-2017|04-03-2017|A&lt;BR /&gt;1|04-03-2017|03-03-2017|04-03-2017|A&lt;BR /&gt;1|05-03-2017|05-03-2017||B&lt;BR /&gt;1|06-03-2017|05-03-2017||B&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;But the problem is the performance is not good when I use the second way on the real data, it spends so much time.&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;So do someone know why the first way doesn't work?&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thank you in advance.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;JulienF&lt;/P&gt;</description>
      <pubDate>Sat, 04 Nov 2017 23:05:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-compare-a-date-and-a-periode/m-p/2316310#M86872</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-04T23:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare a date and a periode?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-compare-a-date-and-a-periode/m-p/2316311#M86873</link>
      <description>&lt;P&gt;Hello JulienF,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;"the first way" joins your tables A and B on "id_pers" and with the match model "unique match" (which is equal to "last match") only the second row of table B is in the join result / lookup data. Then tMap evaluates your date-compare-expression. For the first two (input) rows of table A, their date does not match the date range of the lookup, so they do not have a "type".&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My suggestion is: Join the two tables only on the id_pers field. Use "All matches" as the match policy. Do not use this expression area, instead move the date comparison to the "Var" table.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Best regards,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thomas&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 14:30:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-compare-a-date-and-a-periode/m-p/2316311#M86873</guid>
      <dc:creator>ThWabi</dc:creator>
      <dc:date>2017-11-06T14:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare a date and a periode?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-compare-a-date-and-a-periode/m-p/2316312#M86874</link>
      <description>&lt;P&gt;Hi ThWabi,&lt;/P&gt; 
&lt;P&gt;Thanks for your explication and your suggestion.&lt;/P&gt; 
&lt;P&gt;It's very clear.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;But I didn't really understand that you said "&lt;SPAN&gt;Do not use this expression area, instead move the date comparison to the "Var" table.&lt;/SPAN&gt;".&lt;/P&gt; 
&lt;P&gt;How to move the comparison to the Var Table? Could you give me more detail about this point, please?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Best regard,&lt;/P&gt; 
&lt;P&gt;Julien FAN&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 09:42:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-compare-a-date-and-a-periode/m-p/2316312#M86874</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-07T09:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare a date and a periode?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-compare-a-date-and-a-periode/m-p/2316313#M86875</link>
      <description>&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PersonneType.jpg" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrX5.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/140040i3ABDB3609E545B0B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrX5.jpg" alt="0683p000009LrX5.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Hi Julien,&lt;/P&gt; 
&lt;P&gt;I think a job like this one can do what you want, it uses "Var table" like ThWabi suggested.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Best regards.&lt;/P&gt; 
&lt;P&gt;TD (bon courage)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 13:01:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-compare-a-date-and-a-periode/m-p/2316313#M86875</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-07T13:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare a date and a periode?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-compare-a-date-and-a-periode/m-p/2316314#M86876</link>
      <description>&lt;P&gt;Thank you tdz, it works very well.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 14:14:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-compare-a-date-and-a-periode/m-p/2316314#M86876</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-07T14:14:44Z</dc:date>
    </item>
  </channel>
</rss>

