<?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: Implementing SCD2 on Redshift. Logic Not working in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Implementing-SCD2-on-Redshift-Logic-Not-working/m-p/2230475#M21091</link>
    <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKmJAAW"&gt;@manodwhb&lt;/A&gt;&amp;nbsp;: I am trying that. Inserts are working fine now(after updating the Catch Lookup inner join to "true". Just that Running sequence no is not getting generated in my insert flow.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My requirement is also the same as others, if the Data doesn't exist in Target Table, then insert "I" with todays date and future end date, if it exists then the earlier records end date should be todays date and current records start_date should be "todays date" and end_date should be "future_date".&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Please find the job design attached.&lt;/P&gt; 
&lt;P&gt;expected output should be like below:&lt;/P&gt; 
&lt;TABLE width="837"&gt; 
 &lt;TBODY&gt; 
  &lt;TR&gt; 
   &lt;TD width="99"&gt;Country_id&lt;/TD&gt; 
   &lt;TD width="125"&gt;CountryCode&lt;/TD&gt; 
   &lt;TD width="64"&gt;Skey&lt;/TD&gt; 
   &lt;TD width="175"&gt;Start_date&lt;/TD&gt; 
   &lt;TD width="157"&gt;End_date&lt;/TD&gt; 
   &lt;TD width="64"&gt;Flag&lt;/TD&gt; 
   &lt;TD width="153"&gt;Insert for first time&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;1&lt;/TD&gt; 
   &lt;TD&gt;AF&lt;/TD&gt; 
   &lt;TD&gt;10&lt;/TD&gt; 
   &lt;TD&gt;2020-04-28&lt;/TD&gt; 
   &lt;TD&gt;9999-12-31&lt;/TD&gt; 
   &lt;TD&gt;I&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Country_id&lt;/TD&gt; 
   &lt;TD&gt;CountryCode&lt;/TD&gt; 
   &lt;TD&gt;Skey&lt;/TD&gt; 
   &lt;TD&gt;Start_date&lt;/TD&gt; 
   &lt;TD&gt;End_date&lt;/TD&gt; 
   &lt;TD&gt;Flag&lt;/TD&gt; 
   &lt;TD&gt;History data&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;1&lt;/TD&gt; 
   &lt;TD&gt;AF&lt;/TD&gt; 
   &lt;TD&gt;10&lt;/TD&gt; 
   &lt;TD&gt;2020-04-28&lt;/TD&gt; 
   &lt;TD&gt;2020-04-29&lt;/TD&gt; 
   &lt;TD&gt;I&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;1&lt;/TD&gt; 
   &lt;TD&gt;AG&lt;/TD&gt; 
   &lt;TD&gt;11&lt;/TD&gt; 
   &lt;TD&gt;2020-04-29&lt;/TD&gt; 
   &lt;TD&gt;9999-12-31&lt;/TD&gt; 
   &lt;TD&gt;U&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
  &lt;/TR&gt; 
 &lt;/TBODY&gt; 
&lt;/TABLE&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Malb"&gt;Job_Design_SCD2.png&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Mb0G"&gt;SCD_Insert.png&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Mb1w"&gt;SCD_update.png&lt;/A&gt;</description>
    <pubDate>Tue, 28 Apr 2020 12:19:02 GMT</pubDate>
    <dc:creator>sushantk19</dc:creator>
    <dc:date>2020-04-28T12:19:02Z</dc:date>
    <item>
      <title>Implementing SCD2 on Redshift. Logic Not working</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Implementing-SCD2-on-Redshift-Logic-Not-working/m-p/2230473#M21089</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Presently, I am trying to implement SCD2 without SCD component. But facing the below issue.Its not even Inserting data in my Target table. Please see the screenshots attached. I already have 2 country ids in my target. Source&amp;nbsp; has 253 unique country ids, so as per the Insert update logic it should insert 251 and update 2 records.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:34:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Implementing-SCD2-on-Redshift-Logic-Not-working/m-p/2230473#M21089</guid>
      <dc:creator>sushantk19</dc:creator>
      <dc:date>2024-11-16T02:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Implementing SCD2 on Redshift. Logic Not working</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Implementing-SCD2-on-Redshift-Logic-Not-working/m-p/2230474#M21090</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LQvwAAG"&gt;@sushantk19&lt;/A&gt;&amp;nbsp;, can you change join model to leftouter in tmap and check the data?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 11:52:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Implementing-SCD2-on-Redshift-Logic-Not-working/m-p/2230474#M21090</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2020-04-28T11:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Implementing SCD2 on Redshift. Logic Not working</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Implementing-SCD2-on-Redshift-Logic-Not-working/m-p/2230475#M21091</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKmJAAW"&gt;@manodwhb&lt;/A&gt;&amp;nbsp;: I am trying that. Inserts are working fine now(after updating the Catch Lookup inner join to "true". Just that Running sequence no is not getting generated in my insert flow.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My requirement is also the same as others, if the Data doesn't exist in Target Table, then insert "I" with todays date and future end date, if it exists then the earlier records end date should be todays date and current records start_date should be "todays date" and end_date should be "future_date".&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Please find the job design attached.&lt;/P&gt; 
&lt;P&gt;expected output should be like below:&lt;/P&gt; 
&lt;TABLE width="837"&gt; 
 &lt;TBODY&gt; 
  &lt;TR&gt; 
   &lt;TD width="99"&gt;Country_id&lt;/TD&gt; 
   &lt;TD width="125"&gt;CountryCode&lt;/TD&gt; 
   &lt;TD width="64"&gt;Skey&lt;/TD&gt; 
   &lt;TD width="175"&gt;Start_date&lt;/TD&gt; 
   &lt;TD width="157"&gt;End_date&lt;/TD&gt; 
   &lt;TD width="64"&gt;Flag&lt;/TD&gt; 
   &lt;TD width="153"&gt;Insert for first time&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;1&lt;/TD&gt; 
   &lt;TD&gt;AF&lt;/TD&gt; 
   &lt;TD&gt;10&lt;/TD&gt; 
   &lt;TD&gt;2020-04-28&lt;/TD&gt; 
   &lt;TD&gt;9999-12-31&lt;/TD&gt; 
   &lt;TD&gt;I&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;Country_id&lt;/TD&gt; 
   &lt;TD&gt;CountryCode&lt;/TD&gt; 
   &lt;TD&gt;Skey&lt;/TD&gt; 
   &lt;TD&gt;Start_date&lt;/TD&gt; 
   &lt;TD&gt;End_date&lt;/TD&gt; 
   &lt;TD&gt;Flag&lt;/TD&gt; 
   &lt;TD&gt;History data&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;1&lt;/TD&gt; 
   &lt;TD&gt;AF&lt;/TD&gt; 
   &lt;TD&gt;10&lt;/TD&gt; 
   &lt;TD&gt;2020-04-28&lt;/TD&gt; 
   &lt;TD&gt;2020-04-29&lt;/TD&gt; 
   &lt;TD&gt;I&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
  &lt;/TR&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;1&lt;/TD&gt; 
   &lt;TD&gt;AG&lt;/TD&gt; 
   &lt;TD&gt;11&lt;/TD&gt; 
   &lt;TD&gt;2020-04-29&lt;/TD&gt; 
   &lt;TD&gt;9999-12-31&lt;/TD&gt; 
   &lt;TD&gt;U&lt;/TD&gt; 
   &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; 
  &lt;/TR&gt; 
 &lt;/TBODY&gt; 
&lt;/TABLE&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Malb"&gt;Job_Design_SCD2.png&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Mb0G"&gt;SCD_Insert.png&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Mb1w"&gt;SCD_update.png&lt;/A&gt;</description>
      <pubDate>Tue, 28 Apr 2020 12:19:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Implementing-SCD2-on-Redshift-Logic-Not-working/m-p/2230475#M21091</guid>
      <dc:creator>sushantk19</dc:creator>
      <dc:date>2020-04-28T12:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: Implementing SCD2 on Redshift. Logic Not working</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Implementing-SCD2-on-Redshift-Logic-Not-working/m-p/2230476#M21092</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LQvwAAG"&gt;@sushantk19&lt;/A&gt;&amp;nbsp;,for the update flow you need to check for other than country_id you need to check for other columns data changed or not.are you implementing scd 1 or 2?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 12:29:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Implementing-SCD2-on-Redshift-Logic-Not-working/m-p/2230476#M21092</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2020-04-28T12:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Implementing SCD2 on Redshift. Logic Not working</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Implementing-SCD2-on-Redshift-Logic-Not-working/m-p/2230477#M21093</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKmJAAW"&gt;@manodwhb&lt;/A&gt;&amp;nbsp;: SCD2. what changes are needed in My expressions/Job?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 12:46:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Implementing-SCD2-on-Redshift-Logic-Not-working/m-p/2230477#M21093</guid>
      <dc:creator>sushantk19</dc:creator>
      <dc:date>2020-04-28T12:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Implementing SCD2 on Redshift. Logic Not working</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Implementing-SCD2-on-Redshift-Logic-Not-working/m-p/2230478#M21094</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LQvwAAG"&gt;@sushantk19&lt;/A&gt;&amp;nbsp;,then you need do not equals county_id with lookup id and you need compare for the other non-key columns to check is it new or update.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 13:06:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Implementing-SCD2-on-Redshift-Logic-Not-working/m-p/2230478#M21094</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2020-04-28T13:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Implementing SCD2 on Redshift. Logic Not working</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Implementing-SCD2-on-Redshift-Logic-Not-working/m-p/2230479#M21095</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKmJAAW"&gt;@manodwhb&lt;/A&gt;&amp;nbsp; Thanks for quick reply.&lt;/P&gt; 
&lt;P&gt;I have created a separate job just to test my update logic. It has two flows one for end dating y earlier record and other one for inserting my new record identified as "update". Later I will merge this code with insert flow.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;But keeps running without succeeding, there are hardly 253 records in source. what could be possible bottleneck? how do i make this job run faster? please see the job design attached. how much should an update take ?&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Mb2B"&gt;Update_SCD_Logic.png&lt;/A&gt;</description>
      <pubDate>Tue, 28 Apr 2020 14:23:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Implementing-SCD2-on-Redshift-Logic-Not-working/m-p/2230479#M21095</guid>
      <dc:creator>sushantk19</dc:creator>
      <dc:date>2020-04-28T14:23:28Z</dc:date>
    </item>
  </channel>
</rss>

