Forum Discussion

dolphinantonym's avatar
10 months ago
Solved

Updating a Semantic Model to use a different Workspace

I have created a Semantic Model via the Fabric web UI, with tables coming from Lakehouses in a particular Workspace.

 

I want to update this Semantic Model to use tables from a different Lakehouse. How do I do this?

 

It looks like it is related to the Settings > Gateway and cloud connections area of the model. The "SqlServer" string is the same ID as the SQL endpoint of the Lakehouse the model is using, but I can't figure out where the "database" ID needs to come from. I have two Semantic Models pointing to the same Lakehouse, and they have the same SqlServer ID, but different database IDs.

  • I had a call with Microsoft and resolved this issue.

     

    1. Open Deployment Pipeline’s “Rules”

    2. Chose “Data source rules”

    3. “Server”

      1. Navigate to the Workspace you want the Semantic Model’s data to come from

      2. Click the three dots against the Lakehouse you need to use > Settings

      3. Copy the SQL analytics endpoint > SQL connection string into the “Server” section of the Data source rule

    4. “Database”

      1. Navigate to the Workspace you want the Semantic Model’s data to come from

      2. Click into the SQL analytics endpoint of the Lakehouse you need to use

      3. Copy the GUID after mirroredwarehouse in the URL into the “Database” section of the Data source rule, i.e. the "Artifact ID" in a URL that looks like this https://app.fabric.microsoft.com/groups/<Workspace ID>/<Artifact type>/<Artifact ID>/

11 Replies

  • 1. A semantic model (in Fabric) can be built in Direct Lake mode (where tables are read directly from a lakehouse via parquet/Delta) or in Import / DirectQuery modes via SQL analytics endpoints.
    2. The model’s data sources (gateway / cloud connection settings) are managed under Settings → Gateway & cloud connections in the semantic model item.
    3. You can script or copy a semantic model via APIs or external tools (e.g. Semantic Link Labs) to another workspace. The copy may preserve metadata/logic, but you’ll likely need to reconfigure the connection sources / credentials.
    4. For Direct Lake models, the data connection metadata includes a pointer to the SQL analytics endpoint of the lakehouse. The model “database” ID is tied to that endpoint.
    Microsoft Learn

    • dolphinantonym's avatar
      dolphinantonym
      Helper I

      rajeshgumpena wrote:

      1. A semantic model (in Fabric) can be built in Direct Lake mode (where tables are read directly from a lakehouse via parquet/Delta) or in Import / DirectQuery modes via SQL analytics endpoints.
      2. The model’s data sources (gateway / cloud connection settings) are managed under Settings → Gateway & cloud connections in the semantic model item.
      3. You can script or copy a semantic model via APIs or external tools (e.g. Semantic Link Labs) to another workspace. The copy may preserve metadata/logic, but you’ll likely need to reconfigure the connection sources / credentials.
      4. For Direct Lake models, the data connection metadata includes a pointer to the SQL analytics endpoint of the lakehouse. The model “database” ID is tied to that endpoint.
      Microsoft Learn


      How do I find the database ID? My connection string looks like this:

       

      SqlServer{"server":"aaaaaaaaa-111111111111.datawarehouse.fabric.microsoft.com","database":"b2-c3-d4"}

       

      I've been able to find the "server" string (it's the SQL connection URL for the Lakehouse), but I can't figure out how to identify where the "database" GUID has come from.

    • dolphinantonym's avatar
      dolphinantonym
      Helper I

      My model is Direct Lake.

       

      Under Settings > Gateway and cloud connections I see something like this:

      SqlServer{"server":"aaaaaaaaa-111111111111.datawarehouse.fabric.microsoft.com","database":"b2-c3-d4"}


      I can find the "server" string - it's the SQL endpoint URL for the Lakehouse - but not the "database" one. What does this GUID relate to? When I look at different Semantic Models using the same Lakehouse, they show different values for this string...

      • rajeshgumpena's avatar
        rajeshgumpena
        Regular Visitor

        That GUID in the "database" field isn’t the actual database name you’d use to connect via SQL; it’s an internal Fabric-assigned ID for the semantic model’s “database” object within the SQL endpoint. Even if multiple semantic models point to the same Lakehouse, each model has its own internal metadata, so the GUID differs across models.

        Think of it as the semantic model’s “wrapper” ID inside the endpoint — it tells Fabric which model’s metadata and measures to expose, while the server string always points to the same Lakehouse SQL endpoint.

        So when working with Direct Lake, you only need the server to query the lakehouse. The database GUID is mostly for internal tracking and API references.

  • I had a call with Microsoft and resolved this issue.

     

    1. Open Deployment Pipeline’s “Rules”

    2. Chose “Data source rules”

    3. “Server”

      1. Navigate to the Workspace you want the Semantic Model’s data to come from

      2. Click the three dots against the Lakehouse you need to use > Settings

      3. Copy the SQL analytics endpoint > SQL connection string into the “Server” section of the Data source rule

    4. “Database”

      1. Navigate to the Workspace you want the Semantic Model’s data to come from

      2. Click into the SQL analytics endpoint of the Lakehouse you need to use

      3. Copy the GUID after mirroredwarehouse in the URL into the “Database” section of the Data source rule, i.e. the "Artifact ID" in a URL that looks like this https://app.fabric.microsoft.com/groups/<Workspace ID>/<Artifact type>/<Artifact ID>/