<?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 Talend compare date doesnt return the right column in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Talend-compare-date-doesnt-return-the-right-column/m-p/2310853#M81941</link>
    <description>Hi,&lt;BR /&gt;I'm trying to get the pipeline_sk when a date is fall between the valid_from_date and valid_to_date and match it by 2 columns, but I dont have the right result.&lt;BR /&gt;row1:&lt;BR /&gt;SOURCE	FACILITY_NAME	PRICE_DATE	PRICE_DF&lt;BR /&gt;PRICE_FACT_MASTER	UNKNOWN	20080101	01-Jan-2008&lt;BR /&gt;PRICE_FACT_MASTER	UNKNOWN	20080101	01-Jan-2008&lt;BR /&gt;PRICE_FACT_MASTER	UNKNOWN	20080101	01-Jan-2008&lt;BR /&gt;row2:&lt;BR /&gt;PIPELINE_SK	SOURCE	PIPELINE_NAME	VALID_FROM_DATE	VALID_TO_DATE	CURRENT_INDICATOR	RECORD_VERSION	RECORD_STATUS&lt;BR /&gt;16	PRICE_FACT_MASTER	UNKNOWN	01-01-2008	31-12-2010	0	1	0&lt;BR /&gt;17	PRICE_FACT_MASTER	UNKNOWN	01-01-2011	01-01-9999	1	2	1&lt;BR /&gt;&lt;BR /&gt;The condition are below:&lt;BR /&gt;row1.Source = row2.source&lt;BR /&gt;row1.facility_name = row2.pipeline_name&lt;BR /&gt;TalendDate.compareDate(row1.PRICE_DF,row2.VALID_TO_DATE,"yyyy-MM-dd") &amp;lt;= 0 &amp;amp;&amp;amp;&lt;BR /&gt;TalendDate.compareDate(row1.PRICE_DF, row2.VALID_FROM_DATE,"yyyy-MM-dd")  &amp;gt;= 0&lt;BR /&gt;I'm expecting to get pipeline_sk = 16 as a result, but its not. can you please advise?&lt;BR /&gt;Regards,&lt;BR /&gt;Rera</description>
    <pubDate>Wed, 01 May 2013 01:04:01 GMT</pubDate>
    <dc:creator>_AnonymousUser</dc:creator>
    <dc:date>2013-05-01T01:04:01Z</dc:date>
    <item>
      <title>Talend compare date doesnt return the right column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-compare-date-doesnt-return-the-right-column/m-p/2310853#M81941</link>
      <description>Hi,&lt;BR /&gt;I'm trying to get the pipeline_sk when a date is fall between the valid_from_date and valid_to_date and match it by 2 columns, but I dont have the right result.&lt;BR /&gt;row1:&lt;BR /&gt;SOURCE	FACILITY_NAME	PRICE_DATE	PRICE_DF&lt;BR /&gt;PRICE_FACT_MASTER	UNKNOWN	20080101	01-Jan-2008&lt;BR /&gt;PRICE_FACT_MASTER	UNKNOWN	20080101	01-Jan-2008&lt;BR /&gt;PRICE_FACT_MASTER	UNKNOWN	20080101	01-Jan-2008&lt;BR /&gt;row2:&lt;BR /&gt;PIPELINE_SK	SOURCE	PIPELINE_NAME	VALID_FROM_DATE	VALID_TO_DATE	CURRENT_INDICATOR	RECORD_VERSION	RECORD_STATUS&lt;BR /&gt;16	PRICE_FACT_MASTER	UNKNOWN	01-01-2008	31-12-2010	0	1	0&lt;BR /&gt;17	PRICE_FACT_MASTER	UNKNOWN	01-01-2011	01-01-9999	1	2	1&lt;BR /&gt;&lt;BR /&gt;The condition are below:&lt;BR /&gt;row1.Source = row2.source&lt;BR /&gt;row1.facility_name = row2.pipeline_name&lt;BR /&gt;TalendDate.compareDate(row1.PRICE_DF,row2.VALID_TO_DATE,"yyyy-MM-dd") &amp;lt;= 0 &amp;amp;&amp;amp;&lt;BR /&gt;TalendDate.compareDate(row1.PRICE_DF, row2.VALID_FROM_DATE,"yyyy-MM-dd")  &amp;gt;= 0&lt;BR /&gt;I'm expecting to get pipeline_sk = 16 as a result, but its not. can you please advise?&lt;BR /&gt;Regards,&lt;BR /&gt;Rera</description>
      <pubDate>Wed, 01 May 2013 01:04:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-compare-date-doesnt-return-the-right-column/m-p/2310853#M81941</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-05-01T01:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: Talend compare date doesnt return the right column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-compare-date-doesnt-return-the-right-column/m-p/2310854#M81942</link>
      <description>Since you don't explain how you're trying to do this and haven't provided a screen-print, I've assumed you're using a tMap. 
&lt;BR /&gt;Have you set the "Match Model" to "All matches"? The Match Model affects the results from the join fields only (i.e. row1.Source = row2.source &amp;amp;&amp;amp; row1.facility_name = row2.pipeline_name) and only after that is the filter expression (TalendDate.compareDate(row1.PRICE_DF,row2.VALID_TO_DATE,"yyyy-MM-dd") &amp;lt;= 0 &amp;amp;&amp;amp; TalendDate.compareDate(row1.PRICE_DF, row2.VALID_FROM_DATE,"yyyy-MM-dd") &amp;gt;= 0) applied. With "Unique match", only the last match (pipeline_sk = 17) is accepted to be tested by date, which it fails, resulting in no records in your result. 
&lt;BR /&gt;If that's not your problem, perhaps you're parsing the dates from your sources incorrectly?</description>
      <pubDate>Thu, 02 May 2013 00:35:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-compare-date-doesnt-return-the-right-column/m-p/2310854#M81942</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2013-05-02T00:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: Talend compare date doesnt return the right column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-compare-date-doesnt-return-the-right-column/m-p/2310855#M81943</link>
      <description>Could it be because the dates are in a different format?</description>
      <pubDate>Thu, 02 May 2013 09:14:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-compare-date-doesnt-return-the-right-column/m-p/2310855#M81943</guid>
      <dc:creator>janhess</dc:creator>
      <dc:date>2013-05-02T09:14:50Z</dc:date>
    </item>
  </channel>
</rss>

