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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Direct Query to Azure Databricks Hive Tables not folding

I am trying to use direct query on a Very large table (tens of billions of rows) that pulls data from hive tables on Azure Databricks which points to ADLS Gen2(delta files). The issue is that for whatever reason query folding is disabled even on Source, so it just tries to pull all data before applying filters and obviously it cannot(takes too long and timesout).

I try filtering it using my other 3 Dimension tables and when I use Dax Query builder to recreated the filters that are used in my paginated report, after an hour of loading it just returns the entire column from my Direct Query Fact table(instead of just one row of record) so filtering is not going through this Direct Query for whatever reason.

I don't have the option of pulling all the data into Powerbi(import) since it would end up being close to 400Gb and we don't want to do that since the data is going to grow.

I tried doing some sort of Native Query with the parameters being dynamically chosen by the user, but since this dataset is being used by a Paginated report I don't know how to map my parameters to what the user is going to choose in the paginated report.
so the query was something like this:

 

 

 

sqlQuery = "SELECT * FROMdb.table " &
        "WHERE DepartureDateSID = '" &Departure Date&"'"&
        " AND RouteSID = '" &Route SID&"'"&
        " AND ClientSID = '" &Client SID&"'"&
        Limit 1",

 

 

 

but the question then would be how do I define these parameters dynamically so they get their data from the parameters in a seperate paginated report?(lets say with the same parameter names)

 

Here is a simplified part of the DB relationships which is relevant to what I want to achieve:

Stephano_0-1681057044403.png

 

Here is what I got from the performance analyzer when I tried just adding the columns from the dim tables and then the column from the Fact table within my PBI dataset:

Stephano_1-1681057562399.png

 

Any help would be appreciated as how to handle this issue.

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , have you checked Dynamic M parameters

https://blog.crossjoin.co.uk/category/dynamic-m-parameters/

https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak, Yes I have tried Dynamic M queries and it is all fine if I had the parameters inside my Powerbi Desktop, but the parameters are in a seperate Paginated report. How would I get the value from those parameters from a seperated paginated report dynamically into my dataset is the problem I had with that approach.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors