<?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 Provide Complex filter condition in replication task in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/Provide-Complex-filter-condition-in-replication-task/m-p/2437869#M10446</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am trying to migrate data via full load task from db2 z/os to PostgreSQL and want to know how to provide filter condition like below:&lt;/P&gt;
&lt;P&gt;Table to be replicate: employee&lt;/P&gt;
&lt;P&gt;Filter condition: select * from&amp;nbsp;employee where deptid in (select deptid from department where region = 'US');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't see any option to build a complex filter like above directly in replication task, except I build a view in source with this condition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Rakesh&lt;/P&gt;</description>
    <pubDate>Thu, 04 Apr 2024 12:08:51 GMT</pubDate>
    <dc:creator>rakeshraghav29</dc:creator>
    <dc:date>2024-04-04T12:08:51Z</dc:date>
    <item>
      <title>Provide Complex filter condition in replication task</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Provide-Complex-filter-condition-in-replication-task/m-p/2437869#M10446</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am trying to migrate data via full load task from db2 z/os to PostgreSQL and want to know how to provide filter condition like below:&lt;/P&gt;
&lt;P&gt;Table to be replicate: employee&lt;/P&gt;
&lt;P&gt;Filter condition: select * from&amp;nbsp;employee where deptid in (select deptid from department where region = 'US');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't see any option to build a complex filter like above directly in replication task, except I build a view in source with this condition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Rakesh&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 12:08:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Provide-Complex-filter-condition-in-replication-task/m-p/2437869#M10446</guid>
      <dc:creator>rakeshraghav29</dc:creator>
      <dc:date>2024-04-04T12:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Provide Complex filter condition in replication task</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Provide-Complex-filter-condition-in-replication-task/m-p/2437889#M10448</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;SPAN&gt;Rakesh&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/294586"&gt;@rakeshraghav29&lt;/a&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Welcome to Qlik Community forum and thanks for reaching out here!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Except the option of creation VIEW in DB2z, We might use the "&lt;FONT face="courier new,courier"&gt;Fullload Passthru Filter&lt;/FONT&gt;" for such complex filter, this is &lt;A title="an example how to use it" href="https://community.qlik.com/t5/Qlik-Replicate/unable-to-find-fl-passthru-filter-in-UI/m-p/2139661#M8185" target="_blank" rel="noopener"&gt;an example how to use it&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;John.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 13:15:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Provide-Complex-filter-condition-in-replication-task/m-p/2437889#M10448</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2024-04-04T13:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Provide Complex filter condition in replication task</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Provide-Complex-filter-condition-in-replication-task/m-p/2438044#M10454</link>
      <description>&lt;P&gt;Best option, for full-load only,&amp;nbsp; is really the view as you suggest.&lt;/P&gt;
&lt;P&gt;Next best a push-thru filter as per&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/115309"&gt;@john_wang&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now if this filtering also needs to be in place for CDC, then there is the 'data enrichment' SOURCE_LOOKUP function which can help you create a filter expression.&lt;/P&gt;
&lt;P&gt;This is executed row by row, but with caching option which should alleviate overhead a lot in your case (regions in the US are likely very stable, perhaps occasionally updated overnight.&lt;/P&gt;
&lt;P&gt;source_lookup(TTL,SCHM,TBL,EXP,COND,COND_PARAMS)&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;source_lookup(3600,'your_schema','department','count(1)','deptid = :1 and region = 'US'',$regionid)&lt;/LI&gt;
&lt;LI&gt;TTL would be 3600 (an hour)&lt;/LI&gt;
&lt;LI&gt;Schema&lt;/LI&gt;
&lt;LI&gt;TBL = department&lt;/LI&gt;
&lt;LI&gt;EXP='count(1)'&lt;/LI&gt;
&lt;LI&gt;COND = deptid = :1 and region = 'US'&lt;/LI&gt;
&lt;LI&gt;COND_PARAMS = $regionid&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Hein&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 16:34:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Provide-Complex-filter-condition-in-replication-task/m-p/2438044#M10454</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2024-04-04T16:34:52Z</dc:date>
    </item>
  </channel>
</rss>

