Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
rajeshvaswani77
Specialist III
Specialist III

Introduce time delay when making google API call

Hi All,

While doing Geo-tagging, I noticed that for soem countries the co-ordinates are not fetched. When I go in debug mode using step, then all the co-ordinates are fetched.  In the code I am traversing across the list of addresses and creating a table out of the responses got. The table wioll have the country along with teh co-ordinates later on these are stored in a QVD and teh QVD is used in teh correspondign dashboard to display teh hot spots. My feelign is that since teh calls to the google API are too quick, for some requests the fetch happens and for some it does not. Can someone help on this? one option could be to introduce a time delay between each call, other option could be to make a request and then wait for response, only when response is got we make the next request.

thanks,

Rajesh Vaswani

1 Reply
erichshiino
Partner - Master
Partner - Master

Hi,

Beetween calls, you can include the sleep statement.

The parameter is the miliseconds you want to wait.

I usually use 100:

sleep 100;

Hope it helps,

Erich