A team wants warehouse schema changes reviewed in pull requests, built and validated before deployment, and deployed the same way to each environment. What do you use?
- Exam domain
- Implement and manage an analytics solution30–35% of the exam
- Difficulty
- Hard
- In this mock
- 20 questions on this domainPractise this domain
Why the exam asks this
Implement and manage an analytics solution: Implement lifecycle management in Fabric.
Objective in the exam guide: Implement database projects.
Schema changes cause outages when done by hand. The exam checks the database-as-code approach.
Why B is the answer
A SQL database project that builds a .dacpac and is published with SqlPackage
A SQL database project keeps the schema as code. Building it validates the SQL and produces a .dacpac, and publishing applies the needed changes to each target.
Remember: Schema as code: SQL database project, .dacpac, SqlPackage publish.
How it works
A SQL database project is a local representation of a database schema as .sql files.
Building the project validates the syntax and creates a .dacpac file, a model of the schema.
Publishing compares the .dacpac with the target and applies only the needed changes.
Clues in the question
The words that point to the answer, and what each one tells you.
- Reviewed in pull requests
- Schema as code in Git.
- Built and validated
- A build step.
In detail
- Generate the deployment script first to review changes before publishing to production.
- Set BlockOnPossibleDataLoss to true for production deployments.
Side by side with look-alikes
| Method | Validated before deploy? | Same in every environment? |
|---|---|---|
| SQL database project with .dacpac and SqlPackage | Yes | Yes |
| Manual ALTER scripts | No | No |
| Nightly dataflow recreate | No | Destructive |
| Shortcut | Not a deployment | No |
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. A shortcut to the production warehouseWrong
A shortcut references data; it does not deploy schema.
B. A SQL database project that builds a .dacpac and is published with SqlPackageRight
Schema as code: SQL database project, .dacpac, SqlPackage publish.
C. Manual ALTER TABLE scripts run in the portalWrongMost tempting
Manual scripts are not validated or versioned.
Why it tempts: Scripts are the quickest way to change a table. But they are not validated, versioned or applied identically everywhere.
D. A dataflow that recreates the tables nightlyWrong
Recreating tables loses data and history.
In practice
- Run the SqlPackage Script action in the release to produce the T-SQL for a reviewer before publishing.
Use case
An illustrative scenario, not a real incident.
Every schema change goes through a pull request; CI builds the project, and the release publishes the same .dacpac to test and production.
See how it works
flowchart LR G["SQL files in Git"] --> B["Build: validate and create .dacpac"] B --> T["Publish to test warehouse"] T --> P["Publish to production warehouse"]
How to read this chart
- Read it in order: SQL files in Git, then Build: validate and create .dacpac, then Publish to test warehouse, then Publish to production warehouse.