Forum Discussion
Does getDefinition support DirectLake semantic models?
- 4 months ago
Hi jaryszek ,
The current API behavior is as expected. The getDefinition endpoint may not consistently return a definition for DirectLake semantic models created directly on a Lakehouse, since the model is not always stored as a fully serialized definition. Much of the metadata is dynamically derived from the underlying Delta tables, which can result in the API returning null even when the request completes successfully. This does not indicate a failure.
Currently, there is no REST API that guarantees a non-null definition for DirectLake models. If you need a reusable model definition for automation or copy scenarios, it is more reliable to use models deployed through XMLA or similar methods where the definition is fully persisted.
For copy or deployment scenarios involving DirectLake, it is recommended to use the XMLA endpoint or external tools to script or recreate the model, rather than relying on getDefinition. If this approach does not fit your requirements or you need this capability via REST, please consider submitting a Microsoft support ticket for further assistance.
To raise a support ticket for Fabric and Power BI, kindly follow the steps outlined in the following guide: How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn.
Thank you.
Has anyone had a similar case and can confirm based on real experience, not docs?
Best,
Jacek
- v-tejrama5 months agoCommunity Support
Hi jaryszek ,
Thank you for reviewing this and sharing your test results. The behavior you observed has also been reported by others in the community. When a long-running operation completes successfully, the getDefinition endpoint may still return a null definition for semantic models using DirectLake over OneLake.
This differs from Import or DirectQuery models, where the TMDL definition is typically available after the operation finishes. Based on your results, there does not appear to be an issue with your API call rather, it is related to how the REST endpoint handles definitions for this storage configuration. Currently, there are few confirmed cases of the API returning a populated TMDL definition for DirectLake over OneLake models, so your experience aligns with existing feedback.
As a workaround, some users retrieve metadata through the XMLA endpoint or tools like Tabular Editor, which can script the semantic model even if the REST API returns a null definition. If anyone has successfully obtained a populated result for DirectLake models using this endpoint, their insights would be valuable.
Thank you.- jaryszek5 months agoSuper User
Thanks,
"Currently, there are few confirmed cases of the API returning a populated TMDL definition for DirectLake over OneLake models" do you nkow what is different in those models where definition is there than others?- v-tejrama5 months agoCommunity Support
Hi jaryszek ,
Thank you for your follow-up question and for providing additional context. Based on the scenario and the discussion in the thread, the behavior you are seeing is linked to the semantic model type. The getDefinition REST API returns the semantic model definition in TMDL format via a long-running operation, which is consistent for models with fully materialized definitions.In your situation, the semantic model uses DirectLake over OneLake, operating directly on Delta tables in OneLake, rather than relying on a fully imported storage layer. Due to this architecture, the REST API may complete successfully but return a null definition payload for DirectLake models.
This outcome does not indicate an issue with your API call or polling logic it is a reflection of how metadata for DirectLake semantic models is currently exposed. For inspecting or scripting the semantic model structure, connecting through the XMLA endpoint with tools like Tabular Editor or SQL Server Management Studio is recommended, as these tools access the metadata layer directly, even when the REST API does not provide the full model definition.
Thank you.
Tejaswi.