Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
adambrian
Contributor III
Contributor III

Load data from elasticsearch using api

Hi Guys,

 

I've data more than 60000 in elasticsearch, how can i connect using REST api from qlik sense to elasticsearch? Did anyone had tried it?

Thanks,
adam

Labels (2)
4 Replies
Gysbert_Wassenaar

It's possible. You have to use the scroll api.

https://www.elastic.co/guide/en/elasticsearch/reference/7.5/search-request-body.html#request-body-se...

After each post to the .../_search/scroll end point you need to check if you received any data so you can stop when you've retrieved all the data.

 


talk is cheap, supply exceeds demand
adambrian
Contributor III
Contributor III
Author

Hi @Gysbert_Wassenaar ,

Thank for your answer. I tried to understand about scroll but i still don't understand how it works in API.

GET /myIndex/_search?size=60000&scroll=5m

I tried like this and still error.  Can you explain with example?

 

Thanks,
Adam

Gysbert_Wassenaar

You set up the scroll with the first request. That gives you back the first set of results and the scrollid you need to use for subsequent requests. Clearer than the documentation I pointed out I can't make it. Try with curl, postman or insomnia first before trying it with the Qlik rest connector.


talk is cheap, supply exceeds demand
douglaspomerol
Partner - Contributor
Partner - Contributor

Hi Gysbert,

I'm trying to extract data from elasticsearch using the Qlik Sense rest API but when I test the connection to elasticsearch the response is an HTTP protocol error 408 (see attached).  I can use other tools on the qlik server and can pull the data (postman, curl etc.)  You seem to have not had an issue pulling data so wondering what my issue could be?  Qlik are not being very help in helping me troubleshoot...

douglaspomerol_1-1689079354379.png

 

 

any help greatly appreciated.

regards

Doug