<?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: REST connector with automatic date update in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/REST-connector-with-automatic-date-update/m-p/1411090#M3063</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Justin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is a great way of solving it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have just started to use, and learn how to handle, the WITH CONNECTION in other apps and forgot that I could use the same function here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Sep 2017 10:00:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-09-07T10:00:19Z</dc:date>
    <item>
      <title>REST connector with automatic date update</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/REST-connector-with-automatic-date-update/m-p/1411088#M3061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the REST connector in Qlik Sense to import data from Mixpanel to Qlik. This connection works fine and gives me the data I want but I have to specify a date range for the API to work properly. This means that I have to manually update the date range to include new data. I want this connection to always fetch the latest data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my REST connector I have several parameters, which includes "from_date" and "to_date" (as seen in the picture below).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screen Shot 2017-08-16 at 16.27.01.png" class="jive-image image-1" src="/legacyfs/online/173590_Screen Shot 2017-08-16 at 16.27.01.png" style="height: 244px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm wondering if it's possible to automatically have the current date in the "to_date" parameter value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, are there other ways do achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2017 14:40:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/REST-connector-with-automatic-date-update/m-p/1411088#M3061</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-16T14:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: REST connector with automatic date update</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/REST-connector-with-automatic-date-update/m-p/1411089#M3062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One solve for this is to use a variable for your to_date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. In your load script, set a variable&lt;/P&gt;&lt;P&gt;LET vToday = date(Today(),'YYYY-MM-DD');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Leave the connection query parameters as you have them and then change the query parameter in your load script by using the WITH CONNECTION function which will override what you have stored in your connection:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM JSON (wrap on) "root" PK "__KEY_root"&lt;/P&gt;&lt;P&gt;WITH CONNECTION (&amp;nbsp; &lt;/P&gt;&lt;P&gt; QUERY "to_date" "$(vToday)")&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Sep 2017 16:07:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/REST-connector-with-automatic-date-update/m-p/1411089#M3062</guid>
      <dc:creator>justinvchiang</dc:creator>
      <dc:date>2017-09-06T16:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: REST connector with automatic date update</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/REST-connector-with-automatic-date-update/m-p/1411090#M3063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Justin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is a great way of solving it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have just started to use, and learn how to handle, the WITH CONNECTION in other apps and forgot that I could use the same function here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Sep 2017 10:00:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/REST-connector-with-automatic-date-update/m-p/1411090#M3063</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-07T10:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: REST connector with automatic date update</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/REST-connector-with-automatic-date-update/m-p/1696034#M5100</link>
      <description>&lt;P&gt;Hi.can you share a qww example file?&lt;/P&gt;&lt;P&gt;I have an api that give date in a range, but I want give it the date yesterday and the date two last day with the function date(now()-1) and date(now()-2).&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried your answer but It does not work.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 09:00:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/REST-connector-with-automatic-date-update/m-p/1696034#M5100</guid>
      <dc:creator>marjan_it</dc:creator>
      <dc:date>2020-04-23T09:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: REST connector with automatic date update</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/REST-connector-with-automatic-date-update/m-p/1709945#M5229</link>
      <description>&lt;P&gt;Hi Marjan_it, did you figure it out?&lt;/P&gt;&lt;P&gt;If you haven't, I don't have any files to share but if your API is able to accept a range as two parameters you would have to list both in the WITH CONNECTION and ensure the date(now()-1) and date(now()-2) values are both in the expected format of the API.&amp;nbsp; Without any formatting, you'll get MM/DD/YYYY which would fail if the API expected YYYY/MM/DD.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2020 21:21:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/REST-connector-with-automatic-date-update/m-p/1709945#M5229</guid>
      <dc:creator>justinvchiang</dc:creator>
      <dc:date>2020-06-10T21:21:03Z</dc:date>
    </item>
  </channel>
</rss>

