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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
VitorAzevedo
New Member

how to avoid Power BI incremental refresh duplicated queries in BigQuery?

I implemented a incremental refresh in a report that gets a lot of data from Google BigQuery. The issue is that each incremental refresh makes duplicated queries, and one of them is pretty expensive.

As Chris Webb's described in his article, power BI makes two queries in order to import data from a SQL database; one that returns a limited number of rows just to discover the table schema and another to get the actual data.

In many SQL servers, this only compromise performance, but in BigQuery, where the charge is made for the amount of data processed, regardless of the number of resulting rows, this first query is costing us a lot, because query folding is not taking place.

here I have some experiments with smaller datasets to show what is happening:

 

discovery_query.png

 

Notice that the "discovery query" above is processing 121.66 MB to return just one row, while the "data query" below, where the query folding is taking place, is processing just 7.35 MB.

 

data_query.jpg


I have implemented Chris solution modifying my M code, but BigQuery are still receiving duplicated queries. Is there any way to avoid the "discovery query"??

1 ACCEPTED SOLUTION
VitorAzevedo
New Member

Guys, it turns out that its not possible to avoid those duplicate queries, but there is a way to clusterize BigQuery tables to reduce the amount of processed data!

For more details check this post: https://stackoverflow.com/questions/68956799/how-to-avoid-power-bi-incremental-refresh-duplicated-qu...

View solution in original post

3 REPLIES 3
DavidPROVOST
Advocate II
Advocate II

Hi Vitor, we've had the same issue with discovery queries being issued to big query, even with the "new" Bigquery native connector. Have you found an elegant workaround ?

VitorAzevedo
New Member

Guys, it turns out that its not possible to avoid those duplicate queries, but there is a way to clusterize BigQuery tables to reduce the amount of processed data!

For more details check this post: https://stackoverflow.com/questions/68956799/how-to-avoid-power-bi-incremental-refresh-duplicated-qu...

v-easonf-msft
Community Support
Community Support

Hi,  @VitorAzevedo 

You can see if these related tutorials can help.

incremental-refresh-in-powerbi-with-data-from-bigquery 

partitioned-tables-bigquery-power-bi-incremental-daniel-lennartsson 

 

Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.