Deployment Rules

What happens when Dev and Prod need different settings?

The Problem

Your notebook uses a default lakehouse. When you deploy to Prod, which lakehouse does it use?

Dev Workspace
Transform Orders
↓ default
Sales Bronze
Deploy
Prod Workspace
Transform Orders
↓ default
Sales Bronze (DEV!) 💥

💡 Auto-binding handles the simple case — when all items deploy together to the same workspace, Fabric fixes the references automatically. But it can't help with shared lakehouses, external data sources, or cross-workspace references.

How Deployment Rules Work

A deployment rule says: "When deploying to this stage, swap this setting."

Dev Workspace
Transform Orders
↓ default
Sales Bronze (Dev)
Deploy +
Rule Applied ✓
Prod Workspace
Transform Orders
↓ default
Sales Bronze (Prod) ✅
  • Rules are configured on the target stage (where you're deploying to)
  • Set them once — they apply on every deployment
  • Works for lakehouses, data connections, parameters, and more

What You'll Do in Section 3

1
Create a lakehouse and connect it to your notebook
2
Deploy the notebook and lakehouse to Production
3
Configure a deployment rule to swap the lakehouse
4
Deploy again and verify the rule works

Let's get started!