Forum Discussion
Help with Semantic Model connection
- 6 months ago
Hi GlibAvrutin,
The issue happens because the semantic model in your DEV workspace relies on another upstream semantic model, which is still connected to the PROD KQL database instead of the DEV one. When a semantic model uses a live connection or DirectQuery to another model, you can’t change the data source from the downstream model, so the KQL database connection doesn’t appear in the Data source settings.
To fix this, go to the DEV workspace and check the Lineage view for your semantic model to find the upstream model or data item it depends on. If it’s pointing to the PROD KQL database, update that upstream model by changing the KQL cluster URL and database name to DEV. Save, publish, and refresh so the changes apply to dependent models.
If you can’t modify the upstream model, it’s best to create a new semantic model in DEV that connects directly to the DEV KQL database and update your reports to use this model. For environments using deployment pipelines, setting up environment-specific parameters or data source rules ensures that DEV, TEST, and PROD models connect to the right KQL databases automatically.
Thank you
Sahasra.
Hi GlibAvrutin,
The issue occurs because the semantic model is still set to connect to the PROD KQL database, and simply changing the cloud connection does not update the database reference in the model. In Microsoft Fabric, the KQL database details are specified in the data source connection within the semantic model.
To resolve this, go to your DEV workspace, open the semantic model, select Edit, and then open Transform data (Power Query). Check the KQL connection step for the cluster URL and database name, which likely point to the PROD database. Update these to use the DEV KQL database, save, and republish the model. After publishing, go to Settings -- Data source credentials to re-authenticate if needed and refresh the model.
If the model cannot be edited (such as when deployed via pipeline), you will need to redeploy it with environment-specific rules or create a new semantic model in DEV connected to the DEV KQL database. The main point is that the database reference inside the model must be updated; changing only the cloud connection will not redirect it to DEV.
Thank you.
Hi v-sgandrathi, thank you for your answer. The algorithm you gave me sounds clear enough, but I could not execute the step where I change the kql db reference of the semantic model. In the Data Source tab there are only other semantic models from other workspaces. I can provide additional info if you need it
Thank you