Forum Discussion
Does getDefinition support DirectLake semantic models?
- 3 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.
Ok thank you,
still have questions:
1. the exact deterministic rule for predicting which DirectLake model will return null
2. whether Microsoft considers this expected permanent behavior or a limitation/bug
3. how to force a DirectLake model to always have a serialized definition
Thank you,
Jacek
Hi jaryszek ,
Thank you for sharing these questions. Based on the current behavior of the Fabric REST APIs and Microsoft documentation, there is no documented rule to determine which DirectLake semantic models will return a populated definition or a null result when using the getDefinition endpoint. The API provides a definition only if a serialized semantic model definition exists in the service. In DirectLake scenarios, especially when models are built directly on OneLake tables, some metadata may be dynamically resolved from lake metadata rather than being fully stored as a serialized artifact. This can cause the API to return a null definition, even though the model operates as intended.
Microsoft documentation does not list this as a product bug it is considered a limitation of REST API coverage for certain DirectLake cases. While additional API features may be introduced as the product develops, there is currently no assurance that DirectLake semantic models will always return a serialized definition through this endpoint.
To reliably retrieve or script the semantic model structure, it is advised to use the XMLA endpoint with tools like Tabular Editor or SQL Server Management Studio, which can access model metadata even if the REST API returns a null definition.
Thank you.
- v-tejrama3 months agoCommunity Support
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. - jaryszek4 months agoSuper User
Yes,
please keep thos topic opened. Nobody knows why sometimes it is returning null, sometimes not... - v-tejrama4 months agoCommunity Support
Hi jaryszek ,
Yes, this is now correct. The main difference from your previous result is that the Value column is no longer aggregated, so the duplicate check occurs at the row level as intended.
The value 100 is appropriately flagged as a duplicate when it appears multiple times within the current filter context, while other values are not flagged. This matches the expected behavior for a measure based approach, as it evaluates only the visible rows in the table rather than the entire dataset.
Thank you. - jaryszek4 months agoSuper User
Yes still not explained.
- v-tejrama4 months agoCommunity Support
Hi jaryszek ,
Please review the document, as it may provide useful information. https://learn.microsoft.com/en-us/analysis-services/tmdl/tmdl-overview?view=sql-analysis-services-2025
I also appreciate your efforts in following up on the issue.
Thank you. - jaryszek3 months agoSuper User
Nope it is not answering.
What rest api and how to build semantic model on lakehouse to be sure that I can copy item and it will be not null?
Best,
Jacek