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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Sneaky
New Member

Whats the requirements to create a custom connector for Power BI that supports direct query?

I am trying to developer a custom connector for power BI which supports direct query mode getting data from my API. Problem is whenever I try to create one, it always defaults to Import mode for storage and no ability to change to direct query. I guess I am not implementing the query folding properly. Does anyone have any tutorial or code with a minimal working example?

In my Contents function, I implement 

GetRows

GetExpression
GetType

OnInvoke

 

And on the Publish record, I have SupportsDirectQuery=true there.

 

Are there others I need to do to support direct query?

2 REPLIES 2
V-yubandi-msft
Community Support
Community Support

Hi @Sneaky ,

Thanks for reching out community. @Akash_Varuna ,  totally agree that getting Table.View implemented correctly is key for DirectQuery to work smoothly.

Just to add to your point  along with GetRows, GetExpression, and GetType, it's also helpful to confirm that your query folding logic aligns with what's expected for AST, especially if you're handling dynamic query shapes.

 

If your connector is calling a REST API, Microsoft doesn’t support DirectQuery directly over HTTP you’ll typically need to proxy it through an ODBC driver or similar middleware that can translate to a supported DirectQuery interface.

 

Helpful Reference:

Enabling DirectQuery for an ODBC-based Power Query connector - Power Query | Microsoft Learn

 

Regards,

Yugandhar.

 

Akash_Varuna
Community Champion
Community Champion

Hi @Sneaky To enable Direct Query in a custom Power BI connector, implement Table.View with proper query folding by defining GetRows, GetExpression, and GetType. Add SupportsDirectQuery = true in the Publish record. Ensure your API supports query-based operations and pagination to handle dynamic queries. Test with Power BI Desktop to confirm query folding is functioning correctly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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