<?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>article Filter for last 90 days of data in Qlik Replicate part two in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/Filter-for-last-90-days-of-data-in-Qlik-Replicate-part-two/ta-p/1980009</link>
    <description>&lt;P&gt;This is an extension to&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Knowledge/Filter-for-last-90-days-of-data-in-Qlik-Replicate/ta-p/1880761" target="_blank" rel="noopener"&gt;Filter for last 90 days of data in Qlik Replicate&lt;/A&gt;. This article outlines how to set up a filter for the past 90 days worth of data via a full load pass thru filter or a record selection condition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;You run a task with a 90-day full load pass thru filter enabled. If you have 'TRUNCATE before load' or 'DROP and CREATE table' enabled (Task Settings-&amp;gt; Full load -&amp;gt; Full Load Settings -&amp;gt; Target Table Preparation), only the data in range will be transferred.&lt;/P&gt;
&lt;P&gt;Once the full load completes, it continues to move forward with CDC. Let's say a few months go by and now your target table is not reflecting the last 90 days' worth of data. It is the original 3-month window plus inserts, updates and deletes since the last full load.&lt;/P&gt;
&lt;P&gt;How do you limit the task to data within a specific range?&lt;/P&gt;
&lt;P&gt;Below is an option workaround to this scenario.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Define your time periods and enforce them with record level conditions for CDC changes.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Postgres Source example where today's date is 9/12/22:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pq_admin90daywindow.png" style="width: 704px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/88931iF2495342D2A30C85/image-size/large?v=v2&amp;amp;px=999" role="button" title="pq_admin90daywindow.png" alt="pq_admin90daywindow.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;CREATE TABLE public.filtertest (id INT PRIMARY KEY, first_name VARCHAR(40), created_at TIMESTAMP);&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;INSERT INTO public.filtertest VALUES(1,'Kelly','2022-02-07 10:00:00');&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;INSERT INTO public.filtertest VALUES(2,'Laura','2022-01-07 10:00:00');&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;INSERT INTO public.filtertest VALUES(3,'Blair','2022-09-07 10:00:00');&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;INSERT INTO public.filtertest VALUES(4,'Liz','2022-08-07 10:00:00');&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;INSERT INTO public.filtertest VALUES(5,'Maddie','2022-07-14 10:00:00');&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;INSERT INTO public.filtertest VALUES(6,'Jordan','2022-03-14 10:00:00');&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where Filter conditions are:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="90dayfilterDT.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/88930i98589AB5B32ACB8D/image-size/large?v=v2&amp;amp;px=999" role="button" title="90dayfilterDT.png" alt="90dayfilterDT.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Plain text:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;$created_at &amp;lt; '2022-09-12 10:00:00' AND $created_at &amp;gt; '2022-06-14 10:00:00'&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;created_at &amp;gt; current_date - interval '90' day&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the full load, only records with ID 3, 4,and 5 will apply on the target.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TEST:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;UPDATE public.filtertest SET first_name = 'LARRY' WHERE id = 2;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Will not apply the change.&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;UPDATE public.filtertest SET first_name = 'LARRY' WHERE id = 4;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Will apply the change.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Environment&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;LI-PRODUCT title="Qlik Replicate" id="qlikReplicate"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="font-style: italic;"&gt;The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.&lt;/P&gt;
&lt;H3&gt;Related Content&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Knowledge/Filter-for-last-90-days-of-data-in-Qlik-Replicate/ta-p/1880761" target="_blank" rel="noopener"&gt;Original Article&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Sep 2022 11:26:31 GMT</pubDate>
    <dc:creator>KellyHobson</dc:creator>
    <dc:date>2022-09-13T11:26:31Z</dc:date>
    <item>
      <title>Filter for last 90 days of data in Qlik Replicate part two</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Filter-for-last-90-days-of-data-in-Qlik-Replicate-part-two/ta-p/1980009</link>
      <description>&lt;P&gt;This is an extension to&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Knowledge/Filter-for-last-90-days-of-data-in-Qlik-Replicate/ta-p/1880761" target="_blank" rel="noopener"&gt;Filter for last 90 days of data in Qlik Replicate&lt;/A&gt;. This article outlines how to set up a filter for the past 90 days worth of data via a full load pass thru filter or a record selection condition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;You run a task with a 90-day full load pass thru filter enabled. If you have 'TRUNCATE before load' or 'DROP and CREATE table' enabled (Task Settings-&amp;gt; Full load -&amp;gt; Full Load Settings -&amp;gt; Target Table Preparation), only the data in range will be transferred.&lt;/P&gt;
&lt;P&gt;Once the full load completes, it continues to move forward with CDC. Let's say a few months go by and now your target table is not reflecting the last 90 days' worth of data. It is the original 3-month window plus inserts, updates and deletes since the last full load.&lt;/P&gt;
&lt;P&gt;How do you limit the task to data within a specific range?&lt;/P&gt;
&lt;P&gt;Below is an option workaround to this scenario.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Define your time periods and enforce them with record level conditions for CDC changes.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Postgres Source example where today's date is 9/12/22:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pq_admin90daywindow.png" style="width: 704px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/88931iF2495342D2A30C85/image-size/large?v=v2&amp;amp;px=999" role="button" title="pq_admin90daywindow.png" alt="pq_admin90daywindow.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;CREATE TABLE public.filtertest (id INT PRIMARY KEY, first_name VARCHAR(40), created_at TIMESTAMP);&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;INSERT INTO public.filtertest VALUES(1,'Kelly','2022-02-07 10:00:00');&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;INSERT INTO public.filtertest VALUES(2,'Laura','2022-01-07 10:00:00');&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;INSERT INTO public.filtertest VALUES(3,'Blair','2022-09-07 10:00:00');&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;INSERT INTO public.filtertest VALUES(4,'Liz','2022-08-07 10:00:00');&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;INSERT INTO public.filtertest VALUES(5,'Maddie','2022-07-14 10:00:00');&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;INSERT INTO public.filtertest VALUES(6,'Jordan','2022-03-14 10:00:00');&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where Filter conditions are:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="90dayfilterDT.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/88930i98589AB5B32ACB8D/image-size/large?v=v2&amp;amp;px=999" role="button" title="90dayfilterDT.png" alt="90dayfilterDT.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Plain text:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;$created_at &amp;lt; '2022-09-12 10:00:00' AND $created_at &amp;gt; '2022-06-14 10:00:00'&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;created_at &amp;gt; current_date - interval '90' day&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the full load, only records with ID 3, 4,and 5 will apply on the target.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TEST:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;UPDATE public.filtertest SET first_name = 'LARRY' WHERE id = 2;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Will not apply the change.&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;UPDATE public.filtertest SET first_name = 'LARRY' WHERE id = 4;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Will apply the change.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Environment&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;LI-PRODUCT title="Qlik Replicate" id="qlikReplicate"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="font-style: italic;"&gt;The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.&lt;/P&gt;
&lt;H3&gt;Related Content&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Knowledge/Filter-for-last-90-days-of-data-in-Qlik-Replicate/ta-p/1880761" target="_blank" rel="noopener"&gt;Original Article&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 11:26:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Filter-for-last-90-days-of-data-in-Qlik-Replicate-part-two/ta-p/1980009</guid>
      <dc:creator>KellyHobson</dc:creator>
      <dc:date>2022-09-13T11:26:31Z</dc:date>
    </item>
  </channel>
</rss>

