Forum Discussion

Anmoldeep's avatar
Anmoldeep
Regular Visitor
5 days ago

Not able to extract direct lake semantic models through api

I’m trying to retrieve the item definition of a Power BI semantic model using the Fabric REST API, but the request is failing for some semantic models.The API returns the following error:

 

RuntimeError: Get Item Definition failed.Dataset Workload failed to export the dataset with dataset id . We cannot load this Direct Lake dataset because your Power BI capacity does not support Direct Lake mode. Please use a Power BI capacity type that supports Direct Lake mode.

The semantic model is using Direct Lake mode.

  • Is Get Item Definition / Fabric REST API supported for Direct Lake semantic models only when the workspace is on a Fabric-supported capacity?
  • What specific Power BI/Fabric capacity SKUs support Direct Lake?
  • Is there any way to retrieve the semantic model definition/TMDL for a Direct Lake model when the workspace is on a capacity that doesn't support Direct Lake?
  • Could this error also occur if the model was originally created as Direct Lake but the current workspace/capacity configuration has changed?
  • Are there any recommended APIs or alternative approaches for extracting metadata (tables, columns, measures, relationships, etc.) from Direct Lake semantic models in this situation?

I would especially appreciate clarification on whether this is an API limitation, capacity limitation, or a limitation of the Direct Lake workload itself.

 

Thanks!

2 Replies

  • v-aatheeque's avatar
    v-aatheeque
    Icon for Community Support rankCommunity Support

    Hi Anmoldeep​ 

    Following up to confirm if the earlier responses addressed your query. If not, please share your questions and we’ll assist further.

  • ShivekMaharaj's avatar
    ShivekMaharaj
    Icon for Memorable Member rankMemorable Member

    Hi Anmoldeep​,

    I would separate the Get Definition API support from the Direct Lake capacity requirement here.

    Microsoft's current Get Semantic Model Definition documentation does not list Direct Lake as an unsupported model type. The API supports semantic-model definitions in TMDL or TMSL format, and the documented model-specific limitation is currently an encrypted sensitivity label.

    The error you are receiving points more strongly to the current capacity hosting the semantic model:

    We cannot load this Direct Lake dataset because your Power BI capacity does not support Direct Lake mode.

    Microsoft's current Direct Lake capacity requirements require a Fabric capacity. The published Direct Lake guardrails include Fabric F SKUs starting at F2 and the legacy Power BI Premium per-capacity equivalents such as P1 and above.

    So the first thing I would check is the current workspace capacity assignment, not only the capacity on which the model was originally created.

    If the model was created as Direct Lake while the workspace was on a Fabric capacity and the workspace was later moved to Pro/shared, PPU, A/EM, or another capacity that does not support Direct Lake, that would be consistent with this error. I haven't found Microsoft documentation describing that exact transition as a GetDefinition limitation, so I would treat that as the likely diagnosis rather than a confirmed API rule.

    If possible, I would test this by assigning the workspace to a supported Fabric capacity and then calling getDefinition again. The current semantic-model definition format returns TMDL by default, or TMSL if you explicitly request that format.

    For alternative metadata extraction:

    • If the model can be loaded on a supported capacity, you can also script it through the XMLA endpoint / SSMS.
    • If you only need inventory-level metadata such as tables, columns and measures, the Power BI WorkspaceInfo metadata-scanning APIs can return datasetSchema when metadata scanning is enabled. That is useful for discovery, but it is not a complete replacement for the TMDL/TMSL definition.
    • If this is part of a CI/CD or backup process, I would also consider keeping the semantic model in PBIP/Fabric Git integration, so the TMDL definition is source controlled rather than having to extract it from the live model each time.


    So I don't think this is fundamentally "Get Item Definition does not support Direct Lake." I think the more precise interpretation is:

    GetDefinition supports semantic models, including Direct Lake definitions, but the Direct Lake model still has to be loadable in its current capacity context for the workload to export that definition.

    I would start by checking the workspace's current capacity/SKU and comparing that with the models that export successfully.

    AI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.