<?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 connection: set a path or fill down a value? in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/REST-connection-set-a-path-or-fill-down-a-value/m-p/68771#M6159</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The solution was pretty clear and we don't need to create a bicycle. Maybe it will be helpful for someone else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="text-decoration: underline;"&gt;1. Select the separate total value and set up this value to a variable&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TotalTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT &lt;/P&gt;&lt;P&gt;"__KEY_root",&lt;/P&gt;&lt;P&gt;(SELECT &lt;/P&gt;&lt;P&gt;"total_count",&lt;/P&gt;&lt;P&gt;"__FK_meta"&lt;/P&gt;&lt;P&gt;FROM "meta" FK "__FK_meta")&lt;/P&gt;&lt;P&gt;FROM JSON (wrap on) "root" PK "__KEY_root";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET total = Peek('total_count',0,'TotalTable');&lt;/P&gt;&lt;P&gt;DROP Table TotalTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="text-decoration: underline;"&gt;2. Set up additional variables and use the Offset pagination:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let startAt = 0;&lt;/P&gt;&lt;P&gt;Let pageSize = 100;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for startAt = 0 to total step pageSize&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RestConnectorMasterTable&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;SQL SELECT &lt;/P&gt;&lt;P&gt;"__KEY_root",&lt;/P&gt;&lt;P&gt;(SELECT &lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;WITH CONNECTION(&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;URL "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://www" rel="nofollow" target="_blank"&gt;https://www&lt;/A&gt;&lt;SPAN&gt;....",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;QUERY "offset" "$(startAt)",&lt;/P&gt;&lt;P&gt;QUERY "limit" "$(pageSize)"&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NEXT startAt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Jul 2018 13:17:01 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-07-04T13:17:01Z</dc:date>
    <item>
      <title>REST connection: set a path or fill down a value?</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/REST-connection-set-a-path-or-fill-down-a-value/m-p/68770#M6158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using REST API + QlikView and I've got 4 endpoints (URLs) which contain the data I need. &lt;SPAN style="font-size: 10pt;"&gt;I know that there is a way how not to keep 4 custom connection statements - it is a "WITH CONNECTION" statement, but...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Using REST connector's settings we can set &lt;STRONG&gt;a path &lt;/STRONG&gt;to a&lt;STRONG&gt; &lt;/STRONG&gt;total records parameter&lt;/P&gt;&lt;P&gt;- But using &lt;SPAN style="font-size: 13.3333px;"&gt;"WITH CONNECTION" statement we have to fill down &lt;STRONG&gt;a value&lt;/STRONG&gt; for the total count (but not a path to the field with total) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And it's clear that we don't know the total count of records (count of records can change from time to time). We know just the name of this field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to use path to&amp;nbsp; the total count of records using WITH CONNECTION statement?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Evgeniy&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2021 14:19:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/REST-connection-set-a-path-or-fill-down-a-value/m-p/68770#M6158</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-22T14:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: REST connection: set a path or fill down a value?</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/REST-connection-set-a-path-or-fill-down-a-value/m-p/68771#M6159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The solution was pretty clear and we don't need to create a bicycle. Maybe it will be helpful for someone else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="text-decoration: underline;"&gt;1. Select the separate total value and set up this value to a variable&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TotalTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT &lt;/P&gt;&lt;P&gt;"__KEY_root",&lt;/P&gt;&lt;P&gt;(SELECT &lt;/P&gt;&lt;P&gt;"total_count",&lt;/P&gt;&lt;P&gt;"__FK_meta"&lt;/P&gt;&lt;P&gt;FROM "meta" FK "__FK_meta")&lt;/P&gt;&lt;P&gt;FROM JSON (wrap on) "root" PK "__KEY_root";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET total = Peek('total_count',0,'TotalTable');&lt;/P&gt;&lt;P&gt;DROP Table TotalTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="text-decoration: underline;"&gt;2. Set up additional variables and use the Offset pagination:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let startAt = 0;&lt;/P&gt;&lt;P&gt;Let pageSize = 100;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for startAt = 0 to total step pageSize&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RestConnectorMasterTable&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;SQL SELECT &lt;/P&gt;&lt;P&gt;"__KEY_root",&lt;/P&gt;&lt;P&gt;(SELECT &lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;WITH CONNECTION(&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;URL "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://www" rel="nofollow" target="_blank"&gt;https://www&lt;/A&gt;&lt;SPAN&gt;....",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;QUERY "offset" "$(startAt)",&lt;/P&gt;&lt;P&gt;QUERY "limit" "$(pageSize)"&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NEXT startAt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2018 13:17:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/REST-connection-set-a-path-or-fill-down-a-value/m-p/68771#M6159</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-04T13:17:01Z</dc:date>
    </item>
  </channel>
</rss>

