<?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: How to do dynamic conditional load programmatically using qlik rest api in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/How-to-do-dynamic-conditional-load-programmatically-using-qlik/m-p/2163098#M8947</link>
    <description>&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Hello team,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;If our response has been helpful, please consider clicking "Accept as Solution". This will assist other users in easily finding the answer.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Sushil Kumar&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jan 2024 01:50:28 GMT</pubDate>
    <dc:creator>SushilKumar</dc:creator>
    <dc:date>2024-01-19T01:50:28Z</dc:date>
    <item>
      <title>How to do dynamic conditional load programmatically using qlik rest api</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-to-do-dynamic-conditional-load-programmatically-using-qlik/m-p/2162330#M8909</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;
&lt;P&gt;I am using qlik rest apis to do scheduled load from huge source tables to targets. Today, I am using reload apis, so simply truncating target table and loading everything from source to target table.&lt;/P&gt;
&lt;P&gt;But we wanted to limit the data transfer everytime, so including some dynamic filters or conditions. eg load only rows where date is today's date. Could you please advise how it can be managed programmatically.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 09:42:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-to-do-dynamic-conditional-load-programmatically-using-qlik/m-p/2162330#M8909</guid>
      <dc:creator>tulika</dc:creator>
      <dc:date>2024-01-17T09:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to do dynamic conditional load programmatically using qlik rest api</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-to-do-dynamic-conditional-load-programmatically-using-qlik/m-p/2162492#M8912</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt; &lt;SPAN&gt;But we wanted to limit the data transfer everytime, so including some dynamic filters or conditions.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;It'll be tricky. For starters, assuming you want to keep what was already loaded, you need to change the task setting to "Target Table Preparation - If target table already exists: - Do nothing". This is a task-wide setting, not available per-table (IMHO it should be)&lt;/P&gt;
&lt;P&gt;Next if you wanted to use a filter. T is relatively easy and can indeed be based on a dynamic expression with current date or even a (cached) target_lookup with some start or end value. However, using filters Replicate will still READ all the source rows, just write less.&lt;/P&gt;
&lt;P&gt;Replicate also offers '&lt;STRONG&gt;passthru&lt;/STRONG&gt;' (Pass-through ) filters. Those are SOURCE SQL expression and can use things like 'create_date &amp;gt; sysdate - 1'. Search this forum for passthru for details.&lt;/P&gt;
&lt;P&gt;Finally, how about loading from a VIEW on the source instead of the main table. That gives you maximum flexibility on the filter expression.&lt;/P&gt;
&lt;P&gt;hth,&lt;/P&gt;
&lt;P&gt;Hein&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 15:29:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-to-do-dynamic-conditional-load-programmatically-using-qlik/m-p/2162492#M8912</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2024-01-17T15:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to do dynamic conditional load programmatically using qlik rest api</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-to-do-dynamic-conditional-load-programmatically-using-qlik/m-p/2163098#M8947</link>
      <description>&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Hello team,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;If our response has been helpful, please consider clicking "Accept as Solution". This will assist other users in easily finding the answer.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Sushil Kumar&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 01:50:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-to-do-dynamic-conditional-load-programmatically-using-qlik/m-p/2163098#M8947</guid>
      <dc:creator>SushilKumar</dc:creator>
      <dc:date>2024-01-19T01:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to do dynamic conditional load programmatically using qlik rest api</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-to-do-dynamic-conditional-load-programmatically-using-qlik/m-p/2163115#M8953</link>
      <description>&lt;P&gt;Dear &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/131689"&gt;@tulika&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;One way to achieve this is to use the `WITH CONNECTION` statement in your script, which allows you to modify the URL or other parameters of your REST connection dynamically.&lt;/P&gt;
&lt;P&gt;For example, if you want to load only the rows where the date is today's date, you can create a variable that holds the date value in the format that your API expects, and then use it in the URL of your REST connection. Here is a sample script:&lt;/P&gt;
&lt;P&gt;//sql&lt;/P&gt;
&lt;P&gt;// Define a variable that holds the date value in YYYY-MM-DD format&lt;/P&gt;
&lt;P&gt;LET vDate = Date(Today(), 'YYYY-MM-DD');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;// Connect to your REST connection&lt;/P&gt;
&lt;P&gt;LIB CONNECT TO 'MyRESTConnection';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;// Load the data from the API using the date variable in the URL&lt;/P&gt;
&lt;P&gt;RestConnectorMasterTable:&lt;/P&gt;
&lt;P&gt;SQL SELECT&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; // Your field list here&lt;/P&gt;
&lt;P&gt;FROM JSON (wrap on) "root" PK "__KEY_root"&lt;/P&gt;
&lt;P&gt;WITH CONNECTION (&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; URL "&lt;A href="https://myapi.com/data?date=$(vDate" target="_blank"&gt;https://myapi.com/data?date=$(vDate&lt;/A&gt;)"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also use other variables or expressions in the `WITH CONNECTION` statement, such as query headers, pagination, authentication, etc. For more details and examples, you can refer to the [Qlik help page] on REST connector scripting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;If our response has been helpful, please consider clicking "Accept as Solution". &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;This will assist other users in easily finding the&lt;SPAN&gt;a answer&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Regards,&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Deepak&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 04:06:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-to-do-dynamic-conditional-load-programmatically-using-qlik/m-p/2163115#M8953</guid>
      <dc:creator>deepaksahirwar</dc:creator>
      <dc:date>2024-01-19T04:06:56Z</dc:date>
    </item>
  </channel>
</rss>

