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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
marimba
Regular Visitor

Timeout Google Maps API

Hello community,

 

I'm using the Google Maps Distance Matrix API to calculate the distance between two locations. I created a funcion for the API in the Query editor (following a Curbal tutorial), which I'm then calling from a table that has 2 columns, one for the origin and one for the destination addresses. The function works well and I obtain the distance between A and B without any problem. 

 

The problem comes when I try to apply the query. The dialogue box shows the message "waiting for maps.googleapis.com" and successively the number of added rows increases, but after a few minutes I get the error "OLE DB or ODBC error: [DataSource.Error] AnalysisServices: The connection either timed out or was lost.. api googlemaps". It seems that the addition of rows stops at around 1890 rows. I tried reducing my addresses table size to 1800 rows and then the query was applied without any problem. Any idea why am I not being able to apply the query when there is more than ca. 1800 rows? 

 

 

Thanks for you support!

1 REPLY 1
v-joesh-msft
Solution Sage
Solution Sage

Hi @marimba ,

You can try the following methods:

1. Add a "timeout" parameter:

Go to query editor -right click your web data source - Advanced Editor. This will give you access to M code behind it. You need to specify "timeout" interval in there manually.

>>[timeout=#duration(0,0,30,0)]))

This is a TimeSpan like parameter, with the values representing Days, Hours, Minutes, Seconds.

111.PNG

2. Add a "max-results" parameter if possible

112.PNG

In addition, I will try to find someone who is familiar with this to take a further look at this. I will post back if we have any conclusions on this topic.

Best Regards,

Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.