Forum Discussion

ElektroHulk's avatar
ElektroHulk
Frequent Visitor
1 year ago
Solved

Programatic shortcut creation in Lakehouse, using Fabric API.

Good day,  Just a note, I did reply to a topic that had a relatively similar Subject, however it was old and I thought I would create a new Post, as I am not sure how often old topics are checked ...
  • ElektroHulk's avatar
    ElektroHulk
    1 year ago

    Hello guys,

     

    With the help of a wonderful Microsoft support representative, who provided prompt and efficient assistance, we were able to identify the issues I encountered and find the appropriate solutions.

     

    Ultimately, the correct payload should look like this:

    {
      "path": "Tables",
      "name": "{entity}",
      "target": {
        "type": "Dataverse",
        "dataverse": {
          "environmentDomain": "https://xxxxxxxxx.crm4.dynamics.com",
          "tableName": "{entity}_partitioned",
          "connectionId": "xxxxxxxxx-3bde-xxxx-xxxxx-468a4da92768",
          "deltaLakeFolder": "https://xxxxxxxxxxxxxxx.dfs.core.windows.net/aeth-xxxxxxxxxxxxx/CDS2/deltalake"
        }
      }
    }

    The 'entity' in this case is the name of the Dataverse table you are attempting to create a shortcut in the Fabric Lakehouse for.

     

    The primary issue was related to the deltaLakeFolder property, specifically its value.
    This path points to the file system where Dataverse stores data in Delta Lake format - essentially a "ghost" copy of the Dataverse data, created when using the Link to Microsoft Fabric feature.


    This version of the data is highly compressed due to partitioning, which is why the linked entities have the _partitioned suffix.

    By default, you cannot directly access this Delta Lake location, nor is the URL or path easily obtainable.
    Additionally, after linking Dataverse to Fabric, the entities created in your Lakehouse may not show all their properties when you inspect them (using the ellipsis ... > Properties).

     

    However, there is a method to retrieve this information:

    • In Fabric, remove the existing shortcut to the entity in the Lakehouse.

    • Manually create a new shortcut: Go to your Lakehouse, select Get Data, and choose New Shortcut. Follow the prompts intuitively.

    • Once added, refresh the Lakehouse and locate the newly created shortcut.

    • Click the ellipsis (...) > Properties on the shortcut.

    • You will now see additional metadata available - including deltaLakeFolder, environmentDomain, tableName, connectionId, and more - which can be used when building the Fabric REST API payloads.

    Tip:
    Ensure that you have the correct WorkspaceId and LakehouseId (ItemId for the REST API).
    Workspaces are sometimes labeled as groups and sometimes as workspaces, which can be confusing.
    If unsure, navigate to your Workspace, find the Lakehouse, click Settings (via the ellipsis menu), and check the Livy endpoint, as it contains both the Workspace ID and the Lakehouse ID. 

     

    Finally, Microsoft has promised to update their official documentation based on these findings, which should help others in the future!