<?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: Qlik Replicate | Custom SQL in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036218#M4945</link>
    <description>&lt;P&gt;Do you have sample query filters for eg adding Limit condition in the Pass through filters.&lt;/P&gt;
&lt;P&gt;Only selecting 1000 rows. Can you provide some samples please&lt;/P&gt;</description>
    <pubDate>Thu, 09 Feb 2023 21:27:53 GMT</pubDate>
    <dc:creator>zparveen</dc:creator>
    <dc:date>2023-02-09T21:27:53Z</dc:date>
    <item>
      <title>Qlik Replicate | Custom SQL</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/1816964#M953</link>
      <description>&lt;P&gt;&amp;nbsp;All,&lt;/P&gt;&lt;P&gt;Can I write the customized sql query while selecting the data in Qlik replicate?&lt;/P&gt;&lt;P&gt;If, yes how to do so?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Saurabh&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 11:38:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/1816964#M953</guid>
      <dc:creator>Sauree_10</dc:creator>
      <dc:date>2021-06-22T11:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Replicate | Custom SQL</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/1818659#M960</link>
      <description>&lt;P&gt;Hi Saurabh,&lt;/P&gt;&lt;P&gt;You do not write customized SQL queries for selecting data in Qlik Replicate. You can use table settings to enable filters on the columns that will filter data for Replication.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 18:01:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/1818659#M960</guid>
      <dc:creator>Alan_Wang</dc:creator>
      <dc:date>2021-06-29T18:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Replicate | Custom SQL</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/1826149#M1001</link>
      <description>&lt;P&gt;If you plan to use a Full Load (not CDC) you could create a view with your SQL and use it as a source&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 16:43:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/1826149#M1001</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2021-08-02T16:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Replicate | Custom SQL</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036218#M4945</link>
      <description>&lt;P&gt;Do you have sample query filters for eg adding Limit condition in the Pass through filters.&lt;/P&gt;
&lt;P&gt;Only selecting 1000 rows. Can you provide some samples please&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 21:27:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036218#M4945</guid>
      <dc:creator>zparveen</dc:creator>
      <dc:date>2023-02-09T21:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Replicate | Custom SQL</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036219#M4946</link>
      <description>&lt;P&gt;I'm working on the POC , Postgres SQL as the source and AWS S3 as the target endpoints&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 21:29:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036219#M4946</guid>
      <dc:creator>zparveen</dc:creator>
      <dc:date>2023-02-09T21:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Replicate | Custom SQL</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036225#M4947</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/204956"&gt;@zparveen&lt;/a&gt;&amp;nbsp;You have to add following text in the passthru filter field for the table&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="hljs-keyword"&gt;1=1 LIMIT&lt;/SPAN&gt;&amp;nbsp;1000&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Internally Replicate will convert it as follows:&lt;/P&gt;
&lt;P&gt;select a,b from table where &lt;STRONG&gt;1=1 LIMIT 1000&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 21:51:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036225#M4947</guid>
      <dc:creator>shashi_holla</dc:creator>
      <dc:date>2023-02-09T21:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Replicate | Custom SQL</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036231#M4948</link>
      <description>&lt;P&gt;Thanks Shashi for responding, I tried your filter but still shows it is picking 10 million records when the task is running. Do we have any Qlik guide on this queries pass through?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 22:08:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036231#M4948</guid>
      <dc:creator>zparveen</dc:creator>
      <dc:date>2023-02-09T22:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Replicate | Custom SQL</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036233#M4949</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/204956"&gt;@zparveen&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please have a look at this Techspert where there is a section on doing passthrough filters.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="ui-provider vg b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak"&gt;&lt;A href="https://community.qlik.com/t5/Official-Support-Articles/Qlik-Replicate-Loading-Best-Practices/ta-p/2028269" target="_blank"&gt;https://community.qlik.com/t5/Official-Support-Articles/Qlik-Replicate-Loading-Best-Practices/ta-p/2028269&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Let me know if this helps out.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;BR /&gt;Michael&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 22:18:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036233#M4949</guid>
      <dc:creator>Michael_Litz</dc:creator>
      <dc:date>2023-02-09T22:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Replicate | Custom SQL</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036236#M4950</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/204956"&gt;@zparveen&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can try to create a view in the same database which will select the 1000 rows.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks&lt;BR /&gt;Naren&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 23:09:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036236#M4950</guid>
      <dc:creator>narendersarva</dc:creator>
      <dc:date>2023-02-09T23:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Replicate | Custom SQL</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036297#M4959</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/204956" target="_blank"&gt;@zparveen&lt;/A&gt;&amp;nbsp;,&amp;nbsp;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/143887" target="_blank"&gt;@Sauree_10&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;For PostgreSQL source database, the LIMIT rows sample is:&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;1=1) LIMIT 1000 ;--&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="john_wang_0-1676007500387.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/100150i1B74E9797E431044/image-size/medium?v=v2&amp;amp;px=400" role="button" title="john_wang_0-1676007500387.png" alt="john_wang_0-1676007500387.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 05:38:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036297#M4959</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2023-02-10T05:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Replicate | Custom SQL</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036604#M4976</link>
      <description>&lt;P&gt;Thanks a lot John, the above query did help me. Can you provide me where I can get this query format or what language is this? So I can come up for my other scenarios that I'm trying to test. Thanks for the help again!&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 15:06:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036604#M4976</guid>
      <dc:creator>zparveen</dc:creator>
      <dc:date>2023-02-10T15:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Replicate | Custom SQL</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036786#M4986</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/204956"&gt;@zparveen&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Glad to hear you are interesting how Replicate works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Well, it's not a special language but only a few 'tricks':&lt;/P&gt;
&lt;P&gt;1- The whole passthrough filter expression in the GUI will be executed in source side database so its syntax relies on source database; that means you may use 3rd&amp;nbsp; party JDBC/ODBC query tools to test your SQL, eg SQL Workbench/J,&amp;nbsp;RazorSQL, DBeaver etc, it's much easier to debug SQL than using Replicate task running.&lt;/P&gt;
&lt;P&gt;2- The whole passthrough filter expression (eg "xxxx" ) will be sent to source database combined with "&lt;STRONG&gt;WHERE ( xxxx )&lt;/STRONG&gt;" sub-clause. No way to repress the WHERE sub-clause as it's hard coded, however we may use single &lt;SPAN&gt;right parenthesis&amp;nbsp;&lt;/SPAN&gt;"&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;" to end up the WHERE sub-clause prior to embedded "&lt;STRONG&gt;)&lt;/STRONG&gt;".&lt;/P&gt;
&lt;P&gt;3- "LIMIT nnnn" cannot be included in WHERE clause, we have to move it out of&amp;nbsp;"&lt;STRONG&gt;WHERE ( xxxx )&lt;/STRONG&gt;" string&lt;/P&gt;
&lt;P&gt;4- To make sure no empty parenthesis "(&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;" generated (it may lead syntax error), we add "1=1" (it's TRUE forever). Certainly you may add more clauses eg "1=1 and ID &amp;gt;= 20230101" if necessary (ID is your table column) then you may keep or remove "1=1".&lt;/P&gt;
&lt;P&gt;5- Now we end up the expression by semicolon, it looks like "1=1&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt; LIMIT 1000 ;".&amp;nbsp; The last step is removing the latest useless embedded "&lt;STRONG&gt;)&lt;/STRONG&gt;": We add comment string "--" before it, PostgreSQL will ignore the comment string "--&lt;STRONG&gt;)&lt;/STRONG&gt;". So the whole expression in PostgreSQL is:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;1=1) LIMIT 1000 ;--&lt;/LI-CODE&gt;
&lt;P&gt;With above expression, Replicate will execute the query as:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;2023-02-10T17:00:46 [SOURCE_UNLOAD   ]T:  SELECT ... FROM ... WHERE (1=1) LIMIT 1000 ;--), postgres_construct_select_statement&lt;/LI-CODE&gt;
&lt;P&gt;Hope it helps,&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Feb 2023 03:37:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036786#M4986</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2023-02-11T03:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Replicate | Custom SQL</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036835#M4989</link>
      <description>&lt;P&gt;Thanks a lot John for the explanation!!&lt;/P&gt;</description>
      <pubDate>Sat, 11 Feb 2023 15:06:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Qlik-Replicate-Custom-SQL/m-p/2036835#M4989</guid>
      <dc:creator>zparveen</dc:creator>
      <dc:date>2023-02-11T15:06:32Z</dc:date>
    </item>
  </channel>
</rss>

