Notebooks sql connections
I’m using **Workspace Identity** (not Service Principal) to connect to SQL Server from Fabric notebooks.
My setup:
- 4 workspaces: **dev, test, staging, prod**
- Deployed via **Fabric Deployment Pipelines** (git only on dev)
- 2 connections created in **Manage Connections and Gateways**, both using Workspace Identity auth:
- `dev-sql-connection` → points to the dev database
- `prod-sql-connection` → points to the prod database
My bronze layer notebooks need a connection attached to them. The rule is simple:
- **Dev + Test** → use `dev-sql-connection`
- **Staging + Prod** → use `prod-sql-connection`
The problem is when I deploy changes from **test → staging**, I need the connection to automatically switch from dev to prod. Right now I can’t find a clean way to make this happen dynamically.
Did you encounter this flow in your setup? If so, how did you solve it?
Thanks!
Posted Mar 6, 2026, 3:42 PM UTC