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.
Thank you but this is still does not explain why for some people getDefinition is returning null, for some not.
Best,
Jacek
Hi jaryszek ,
The main point is that there is no documented model-level setting that controls whether getDefinition returns a populated TMDL or null for DirectLake over OneLake semantic models. The REST API provides a definition only if a fully serialized semantic model definition is present in the service. In many DirectLake scenarios, the model structure is generated dynamically from OneLake Delta metadata rather than stored as a separate serialized artifact, which explains why the API may return null.
If a model was created or deployed using workflows that produce a complete tabular model definition, such as XMLA scripting or TMDL deployments, the service may have a serialized definition for the API to return. Due to this architectural difference, the behavior can vary between models using DirectLake, resulting in some users receiving a definition while others receive null.
Thank you.