<?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: left join with date conditions in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255213#M37985</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053900000787AHAAY"&gt;@varun_b&lt;/A&gt;&amp;nbsp;,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Are you referring to below result,&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 200px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8pd.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128306i3D637D6DB3DAF866/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8pd.png" alt="0683p000009M8pd.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This is not duplicate, because it is for different transaction id. See the below screenshot.&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="image.png" style="width: 200px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8pi.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157451iFEDA4D841436B45E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8pi.png" alt="0683p000009M8pi.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This output is for last two records in file1.txt those are&lt;/P&gt; 
&lt;P&gt;833|2019-12-27|12806872&lt;BR /&gt;833|2020-01-08|12840366&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jan 2020 01:20:11 GMT</pubDate>
    <dc:creator>tchandu</dc:creator>
    <dc:date>2020-01-22T01:20:11Z</dc:date>
    <item>
      <title>left join with date conditions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255204#M37976</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone plz help on how to do left join with date condition in tmap?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;like we do in mysql:&lt;/P&gt;&lt;P&gt;T1 table&lt;/P&gt;&lt;P&gt;EMP_ID|trans_date&lt;/P&gt;&lt;P&gt;1|2019-11-29&lt;/P&gt;&lt;P&gt;2|2019-11-30&lt;/P&gt;&lt;P&gt;2|2019-12-02&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;T2 table&lt;/P&gt;&lt;P&gt;EMP_ID|EMP_BELT|START_DATE|END_DATE&lt;/P&gt;&lt;P&gt;1|Green|2019-11-11|null&lt;/P&gt;&lt;P&gt;2|yellow|2019-12-01|2019-12-20&lt;/P&gt;&lt;P&gt;2|green|2019-12-21|null&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected Output:&lt;/P&gt;&lt;P&gt;Emp_id,trans_date,belt&lt;/P&gt;&lt;P&gt;1,2019-11-29,Green&lt;/P&gt;&lt;P&gt;2,2019-11-30,null&lt;/P&gt;&lt;P&gt;2,2019-12-02,yellow&lt;/P&gt;&lt;P&gt;2,2019-12-23,green&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sql query would be:&lt;/P&gt;&lt;P&gt;select t1.EMP_ID,t1.trans_date, t2.EMP_BELT&lt;/P&gt;&lt;P&gt;from t1&amp;nbsp;&lt;/P&gt;&lt;P&gt;left join t2 on t1.c1 =t2.c1&lt;/P&gt;&lt;P&gt;AND (t1.trans_date &amp;gt;=t2.start_date AND(t1.trans_date&amp;lt;=t2.end_date OR t2.end_date is NULL)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Varun&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2020 16:20:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255204#M37976</guid>
      <dc:creator>varun_b</dc:creator>
      <dc:date>2020-01-15T16:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: left join with date conditions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255205#M37977</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; It seems you are joining on column c1 and the date conditions you have mentioned is a filter condition.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; You can do the same in Talend where join condition can be on c1 column and add the below to output filter expression in tMap.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;(t1.trans_date &amp;gt;=t2.start_date AND(t1.trans_date&amp;lt;=t2.end_date OR t2.end_date is NULL)&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;Could you please try it out and let me know?&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt; 
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2020 18:00:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255205#M37977</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-15T18:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: left join with date conditions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255206#M37978</link>
      <description>&lt;P&gt;Hi Nikhil,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;in expression filter of tmap Im not able to give directly &amp;lt;= and &amp;gt;= oprator on date columns so I used&amp;nbsp;(TalendDate.compareDate(t1.trans_date,t2.FLD_START_DATE,"yyyy-MM-dd HH:mm:ss") &amp;gt;=0 &amp;amp;&amp;amp;&lt;BR /&gt;(Relational.ISNULL(t2.FLD_END_DATE)||t2.FLD_END_DATE == null || (TalendDate.compareDate(t1.trans_date,t2.FLD_END_DATE,"yyyy-MM-dd HH:mm:ss")&amp;lt;1)) )&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;But this is giving only records with belt which transaction are done b/w given dates&lt;/P&gt; 
&lt;P&gt;like:&lt;/P&gt; 
&lt;P&gt;1,2019-11-29,Green&lt;/P&gt; 
&lt;P&gt;2,2019-12-02,yellow&lt;/P&gt; 
&lt;P&gt;2,2019-12-23,green&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;where trans_date=&lt;SPAN&gt;2019-11-30 of emp 2 where he was not having any belt dint populate:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;2,2019-11-30,null&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 09:39:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255206#M37978</guid>
      <dc:creator>varun_b</dc:creator>
      <dc:date>2020-01-16T09:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: left join with date conditions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255207#M37979</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053900000787AHAAY"&gt;@varun_b&lt;/A&gt;&amp;nbsp;,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Could you change the match model in tmap to All Matches and try once?&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="11.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9BQ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/156652i9A2C6CD9F75331E1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9BQ.png" alt="0683p000009M9BQ.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 10:28:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255207#M37979</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-16T10:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: left join with date conditions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255208#M37980</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class=""&gt;Yep, I have selected All matches only. I have attached actual tmap screenshot.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class=""&gt;Marked in yellow is my condition.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class=""&gt;kindly help.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture_left_join.JPG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9NI.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130113i7138FD05EC8A6F6E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9NI.jpg" alt="0683p000009M9NI.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 11:00:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255208#M37980</guid>
      <dc:creator>varun_b</dc:creator>
      <dc:date>2020-01-16T11:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: left join with date conditions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255209#M37981</link>
      <description>after doing above changes still out is same.... 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MPcz.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157233iD1A564EF62DE3BC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MPcz.png" alt="0683p000009MPcz.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Thu, 16 Jan 2020 12:31:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255209#M37981</guid>
      <dc:creator>varun_b</dc:creator>
      <dc:date>2020-01-16T12:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: left join with date conditions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255210#M37982</link>
      <description>pmanjunath or nikhilthampi , 
&lt;BR /&gt;can you at least let me know if this is possible or not in telend? cause Im not getting any doc or solutions</description>
      <pubDate>Fri, 17 Jan 2020 04:51:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255210#M37982</guid>
      <dc:creator>varun_b</dc:creator>
      <dc:date>2020-01-17T04:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: left join with date conditions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255211#M37983</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053900000787AHAAY"&gt;@varun_b&lt;/A&gt;&amp;nbsp;,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; You can not filter directly on output in tmap. You have to use few variables. I did sample talend job. Hope it will help you to relate with your issue. I have used files to join. Please see the attachment for talend job and source files.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Lxfc"&gt;Exports.zip&lt;/A&gt;</description>
      <pubDate>Fri, 17 Jan 2020 10:23:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255211#M37983</guid>
      <dc:creator>tchandu</dc:creator>
      <dc:date>2020-01-17T10:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: left join with date conditions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255212#M37984</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class="UserName lia-user-name lia-user-rank-Five-Stars lia-component-message-view-widget-author-username"&gt;&lt;A href="https://community.qlik.com/s/profile/00539000006X6rzAAC" target="_self"&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Five-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;Thanks for you help, its really helpful.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Five-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;I tried the same with a actual data for one emp, its giving me duplicate rows. can you please check and let me know what is the mistake Im doing?? I have attached the job and the sample file.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Five-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;Please help me!!!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Five-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;Regards,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Five-Stars lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;Varun&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Lxca"&gt;sample.zip&lt;/A&gt;</description>
      <pubDate>Mon, 20 Jan 2020 12:42:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255212#M37984</guid>
      <dc:creator>varun_b</dc:creator>
      <dc:date>2020-01-20T12:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: left join with date conditions</title>
      <link>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255213#M37985</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053900000787AHAAY"&gt;@varun_b&lt;/A&gt;&amp;nbsp;,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Are you referring to below result,&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 200px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8pd.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128306i3D637D6DB3DAF866/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8pd.png" alt="0683p000009M8pd.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This is not duplicate, because it is for different transaction id. See the below screenshot.&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="image.png" style="width: 200px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8pi.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157451iFEDA4D841436B45E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8pi.png" alt="0683p000009M8pi.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This output is for last two records in file1.txt those are&lt;/P&gt; 
&lt;P&gt;833|2019-12-27|12806872&lt;BR /&gt;833|2020-01-08|12840366&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2020 01:20:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/left-join-with-date-conditions/m-p/2255213#M37985</guid>
      <dc:creator>tchandu</dc:creator>
      <dc:date>2020-01-22T01:20:11Z</dc:date>
    </item>
  </channel>
</rss>

