Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
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
GetExpression
GetType
OnInvoke
And on the Publish record, I have SupportsDirectQuery=true there.
Are there others I need to do to support direct query?
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.
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
80 | |
76 | |
60 | |
36 | |
33 |
User | Count |
---|---|
91 | |
60 | |
59 | |
49 | |
45 |