<?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: Integrate QLIK with Elastic Search in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/1639512#M447084</link>
    <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;Hello,&lt;BR /&gt;I want make a REST connection for ES.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;I have the same problem, number of lines (10000)&lt;SPAN class=""&gt; I implement your code but I&amp;nbsp; have the following error message:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;"HTTP protocol error 401 (Unauthorized): 'Bearer' authentication schema provided by the web-service is not supported or your credentials are not valid."&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;The credential its OK(the connection work)&lt;/P&gt;&lt;P&gt;Maybe you know why?&lt;/P&gt;&lt;P&gt;Best regard (sorry for my english)&lt;/P&gt;&lt;P&gt;Hanan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Oct 2019 13:12:06 GMT</pubDate>
    <dc:creator>Hanan</dc:creator>
    <dc:date>2019-10-24T13:12:06Z</dc:date>
    <item>
      <title>Integrate QLIK with Elastic Search</title>
      <link>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/29568#M438158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to connect QLik View with Elastic Search. That is to have the QLik view as the visualization system at the front-end which connects and &lt;SPAN style="font-size: 13.3333px;"&gt;directly &lt;/SPAN&gt;executes queries against big data hosted at elastic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Reem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2018 10:07:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/29568#M438158</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-30T10:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Integrate QLIK with Elastic Search</title>
      <link>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/1540445#M439400</link>
      <description>&lt;P&gt;Yes, certainly. ElasticSearch has a REST interface that you can use with the Qlik Sense Rest Connector.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 16:55:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/1540445#M439400</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2019-02-06T16:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Integrate QLIK with Elastic Search</title>
      <link>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/1566212#M441749</link>
      <description>&lt;P&gt;Hi, can you give an example of how to achieve it?&lt;/P&gt;&lt;P&gt;I was trying to use the pagination but elasticsearch has a limit of 10K docs.&lt;/P&gt;&lt;P&gt;Is there a known way to fetch a large index from es using qlik rest connector?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 07:03:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/1566212#M441749</guid>
      <dc:creator>yuvalos3</dc:creator>
      <dc:date>2019-04-08T07:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Integrate QLIK with Elastic Search</title>
      <link>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/1566227#M441753</link>
      <description>&lt;P&gt;You can use the scroll api to get all the data from an index. I use two subroutines to do this. The first gets the first batch and is used to calculate the number of iterations needed to scroll through all the data. The second subroutine is called iteratively in a loop.&lt;/P&gt;&lt;P&gt;CALL GetData_FirstBatch;&lt;/P&gt;&lt;P&gt;For i = 2 To $(vIterations)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALL GetData_NextBatch(i);&lt;BR /&gt;Next&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;SUB GetData_FirstBatch

    SET vTotal=;
    SET vCalls=;
    SET vScroll_ID=;
    SET vBody =;

    LET vSize = 5000;

	LIB CONNECT TO 'elasticsearch_rest_connection'; // just a template, we overrule the url in WITH CONNECTION ...

    RestConnectorMasterTable:
    LOAD
    	*,
        '$(vNow)|1' as BatchNo
        ;
    SQL SELECT 
		...loads of stuff...
    FROM JSON (wrap on) "root" PK "__KEY_root"
   
    WITH CONNECTION (
    URL "https://myelasticsearchsite/myindex-*/_search",
    HTTPHEADER "Authorization" "Bearer $(vSessionToken)",
    QUERY "scroll" "10m",
    QUERY "size" "$(vSize)"
    );


	[hits_u0]:
    LOAD	
    	[total_u0]
    RESIDENT
    	RestConnectorMasterTable
    WHERE
    	NOT IsNull([__FK_hits])
        ;

    LET vTotal = peek ('total_u0',-1,'hits_u0');
    LET vIterations = ceil($(vTotal)/$(vSize));

	DROP TABLE [hits_u0];
   

END SUB


SUB GetData_NextBatch(Iteration)

    [root]:
    LOAD	
    	[_scroll_id]
    RESIDENT
    	RestConnectorMasterTable
    WHERE
    	NOT IsNull([__KEY_root])
        ;

    LET vScroll_ID = peek('_scroll_id',-1,'root');
    LET vBody = '{ "scroll" : "10m", "scroll_id" : "$(vScroll_ID)" }';
    LET vBody = Replace('$(vBody)','"',chr(34)&amp;amp;chr(34));

    DROP TABLE [root]; 
        
    
    LIB CONNECT TO 'elasticsearch_rest_connection';

    CONCATENATE (RestConnectorMasterTable)
    
    LOAD
    	*,
        '$(vNow)|$(Iteration)' as BatchNo
        ;
    SQL SELECT 
		...lots of stuff...
    FROM JSON (wrap on) "root" PK "__KEY_root"

    WITH CONNECTION (
    URL "https://myelasticsearchsite/_search/scroll",    
    HTTPHEADER "Authorization" "Bearer $(vSessionToken)",
    BODY "$(vBody)"
    );
   
    
    
END SUB    &lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Apr 2019 07:46:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/1566227#M441753</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2019-04-08T07:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Integrate QLIK with Elastic Search</title>
      <link>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/1566606#M441790</link>
      <description>&lt;P&gt;Thanks a lot, it was very helpful!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 18:58:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/1566606#M441790</guid>
      <dc:creator>yuvalos3</dc:creator>
      <dc:date>2019-04-08T18:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Integrate QLIK with Elastic Search</title>
      <link>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/1567535#M441827</link>
      <description>&lt;P&gt;Hi, I'm having problem with this script for large amounts of data,&lt;/P&gt;&lt;P&gt;I was trying to retrieve from an index with 500K docs, and it was working fine, took about a minute.&lt;/P&gt;&lt;P&gt;But then I tried to use it for an index with 8.5 million records, and it takes too long and Qlik also stuck on "Loading table" when I go to the Data manager. the 'Data load progress' is getting slower as the time passes by,&lt;/P&gt;&lt;P&gt;I think it has something to do with the concatenation in each loop.&lt;/P&gt;&lt;P&gt;But even if I didn't write it explicitly, Qlik will do the concatenation implicitly because the columns are the same.&lt;/P&gt;&lt;P&gt;I do know that our architect once achieved it using the regular pagination of elasticsearch and just used the:&lt;BR /&gt;"Offset" pagination with: "Count": size, "from": 0, "Total": "root/hits/total".&lt;/P&gt;&lt;P&gt;I'm not sure what I'm doing differently, he told me that he did the very same thing.&lt;/P&gt;&lt;P&gt;Though I can't blame Qlik for this, the pagination limitation is indeed in the elasticsearch.&lt;/P&gt;&lt;P&gt;So, can you think of something else to load such large amounts of data?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2019 10:54:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/1567535#M441827</guid>
      <dc:creator>yuvalos3</dc:creator>
      <dc:date>2019-04-10T10:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Integrate QLIK with Elastic Search</title>
      <link>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/1567662#M441840</link>
      <description>The RestConnectorMasterTable table can get very big. Make sure you're not running out of ram.&lt;BR /&gt;&lt;BR /&gt;If your ES index contains a field that allows you to partition the data into blocks perhaps you can retrieve all the data is smaller sets, like for example 1 million at a time. You retrieve the 1 million records, store them into qvd's, retrieve the next million, concatenate them to the qvd's, store the qvd's with now 2 million records, etc...., till you've got all the records.&lt;BR /&gt;Or perhaps you can partition your ES index into several indices and load from each separate index one at a time and store intermediate results into qvd's again.</description>
      <pubDate>Wed, 10 Apr 2019 13:35:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/1567662#M441840</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2019-04-10T13:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Integrate QLIK with Elastic Search</title>
      <link>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/1569391#M441985</link>
      <description>&lt;P&gt;I just want to update how we managed to solve the issue.&lt;/P&gt;&lt;P&gt;We've increased the index parameter index.max_result_window to 10M.&lt;/P&gt;&lt;P&gt;After that, we used a regular pagination (no scroll)&lt;/P&gt;&lt;P&gt;In the rest connector we put the following:&lt;/P&gt;&lt;P&gt;URL: our index url&lt;/P&gt;&lt;P&gt;Pagination: Offset&lt;/P&gt;&lt;P&gt;'Start' param name: from&lt;/P&gt;&lt;P&gt;'Start' initial value: 0&lt;/P&gt;&lt;P&gt;'Count' parameter name: size&lt;/P&gt;&lt;P&gt;'Count' initial value: 10000&lt;/P&gt;&lt;P&gt;'Total records' path: root/hits/total&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This took about 100 minutes to load 8.5M records from es.&lt;/P&gt;&lt;P&gt;Afterwards we had another issue, we couldn't load the 'Data manager' window.&lt;/P&gt;&lt;P&gt;We've bypassed it by adding at the end of the script a store command to a qvd file:&lt;/P&gt;&lt;P&gt;STORE [TableName] into [lib://[qvd_folder_connector]/[FileName].qvd];&lt;/P&gt;&lt;P&gt;And then we've created an app and loaded the data from the qvd file instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 12:20:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/1569391#M441985</guid>
      <dc:creator>yuvalos3</dc:creator>
      <dc:date>2019-04-15T12:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Integrate QLIK with Elastic Search</title>
      <link>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/1569533#M442010</link>
      <description>Thanks for the feedback!</description>
      <pubDate>Mon, 15 Apr 2019 15:19:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/1569533#M442010</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2019-04-15T15:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Integrate QLIK with Elastic Search</title>
      <link>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/1639512#M447084</link>
      <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;Hello,&lt;BR /&gt;I want make a REST connection for ES.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;I have the same problem, number of lines (10000)&lt;SPAN class=""&gt; I implement your code but I&amp;nbsp; have the following error message:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;"HTTP protocol error 401 (Unauthorized): 'Bearer' authentication schema provided by the web-service is not supported or your credentials are not valid."&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;The credential its OK(the connection work)&lt;/P&gt;&lt;P&gt;Maybe you know why?&lt;/P&gt;&lt;P&gt;Best regard (sorry for my english)&lt;/P&gt;&lt;P&gt;Hanan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 13:12:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/1639512#M447084</guid>
      <dc:creator>Hanan</dc:creator>
      <dc:date>2019-10-24T13:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Integrate QLIK with Elastic Search</title>
      <link>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/2110685#M1224483</link>
      <description>&lt;P&gt;Dear Yuvalos3,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/69437"&gt;@yuvalos3&lt;/a&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/12989"&gt;@Michael_Tarallo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried your way in Qlik Sense , screen below :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sanjoybarai_0-1693291484577.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/115270iDCF19AC6AF31A51C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sanjoybarai_0-1693291484577.png" alt="sanjoybarai_0-1693291484577.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But while loading the data it gave me error as "Total filed path" is not correct.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sanjoybarai_1-1693291562335.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/115271i3E013D819F008A21/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sanjoybarai_1-1693291562335.png" alt="sanjoybarai_1-1693291562335.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In "data manager" I do see like below way :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sanjoybarai_2-1693292330407.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/115273iE99B8F23D9FC87D3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sanjoybarai_2-1693292330407.png" alt="sanjoybarai_2-1693292330407.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Note:&amp;nbsp; 1.as total became "total_u0" , I also tried with&amp;nbsp; both "root/hits/total_u0"&amp;nbsp; and&amp;nbsp; "root/hits/total"&amp;nbsp; as total record path param in Pagination-offset. But no luck.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. If I un-check the 'Look in header' option , the load-data works but I dont get all records ...only 10000 approx.&lt;/P&gt;
&lt;P&gt;If JSON output from POSTman with simple POST qry , I see total like below way . So not sure where exactly , I missing to identify the correct path .&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sanjoybarai_3-1693292619429.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/115274iEFA7DBF3E9BA2255/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sanjoybarai_3-1693292619429.png" alt="sanjoybarai_3-1693292619429.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Sanjoy&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 09:03:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/2110685#M1224483</guid>
      <dc:creator>sanjoybarai</dc:creator>
      <dc:date>2023-08-29T09:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Integrate QLIK with Elastic Search</title>
      <link>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/2111784#M1224488</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/69437" target="_blank"&gt;@yuvalos3&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/12989" target="_blank"&gt;@Michael_Tarallo&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; -- Need your help !&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 09:49:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Integrate-QLIK-with-Elastic-Search/m-p/2111784#M1224488</guid>
      <dc:creator>sanjoybarai</dc:creator>
      <dc:date>2023-08-31T09:49:23Z</dc:date>
    </item>
  </channel>
</rss>

