Prepstellar

DP-700 · Workspace Lifecycle Management

23 cards

Workspace Version Control

Swipe, scroll or use ← →
  1. Connect a workspace to a repository

    Source control exists so that several developers can make incremental workspace updates frequently and reliably, with the usual Git advantages: a history of what changed, review before anything lands, and a way back.

    Fabric Git integration connects a workspace to a remote repository in Azure DevOps or GitHub. Continuous integration automation built around it — validating a pull request, updating an integration workspace from Git — runs in any runner: GitHub Actions, Azure Pipelines, or a self-hosted one. With the Azure DevOps provider, service principal support lets those flows authenticate without a signed-in user.

    The connection is made once for the workspace, in workspace settings, and the tenant setting for Git integration has to be enabled first.

    1 / 23
  2. Connect a workspace to a repository

    The scope of that connection is the detail people get wrong.

    The repository connection applies at the workspace level: a single branch in the repository is associated with the workspace. The repository can hold many branches, but only the code in the branch selected in workspace settings directly affects that workspace. Nothing arrives from the other branches until the selection changes or a merge brings their content into the selected one.

    Because a workspace is shared, development has to happen somewhere isolated. Fabric gives two options for that isolated environment: an IDE on the local machine, such as Power BI Desktop or Visual Studio Code, or a different Fabric workspace. The development process itself is the same whichever release option the team later chooses.

    2 / 23
  3. Quick check

    A team wants reviewed, incremental changes to a Fabric workspace, and its code already lives in GitHub. What does Git integration connect that workspace to?

    1. AOne selected branch of an Azure DevOps or GitHub repository

      Right. The supported providers are Azure DevOps and GitHub, and the connection binds the workspace to the single branch selected in workspace settings.

    2. BEvery branch of a GitLab or Bitbucket repository

      GitLab and Bitbucket are not the supported providers, and a workspace is never affected by every branch at once.

    3. CA OneLake folder that mirrors the workspace

      Git integration targets a remote repository from a supported provider, not a storage folder in OneLake.

    3 / 23

  4. Commit the database, then update it back

    For a Fabric SQL database the integration works in two directions, and the two directions do different things.

    Committing converts the live database into code. Create a table, a stored procedure, or another object; open the Source control panel; select the database and choose Commit. The service reads the object definitions from the database and writes them to the remote repository. From then on the history of those definitions is visible in the repository's source view, and every later edit is committed the same way.

    Updating goes the other way: it validates the code in the repository before applying a differential change to the database — only what differs is applied.

    4 / 23
  5. Commit the database, then update it back

    What the team gains from that round trip is ordinary Git practice applied to database objects: a history of definitions over time, plus branching, merging, and pull-request review of the code that describes them.

    One quirk is worth expecting. Straight after an update, the database may show as Uncommitted, because Git integration compares the whole generated file content for an item and small unintended differences — inline column attributes, for instance — can appear. Committing back from the Fabric web interface re-syncs the definition with what a commit generates.

    5 / 23
  6. Quick check

    What does the Commit button on the Source control panel do for a Fabric SQL database?

    1. AIt copies the table rows into the repository as data files

      Commit captures object definitions, not the contents of the tables.

    2. BIt validates the repository code and applies it to the database

      That describes the update direction, which validates repository code before applying a differential change.

    3. CIt reads the live object definitions and writes them as code

      Right. The service reads the definitions from the live database and writes them to the remote repository as code.

    6 / 23

  7. Release option one: Git as the source of truth

    Once a pull request is merged into the team's shared branch, the release process begins — and Fabric offers more than one shape for it.

    In the Git integration option, every deployment originates from the repository. Each stage of the release pipeline has its own dedicated primary branch — Dev, Test, and Prod — feeding the matching workspace. When a pull request to the Dev branch is approved and merged, a release pipeline updates the Dev workspace, and the upload comes straight from the repository into the workspace through the Fabric Git APIs. A pull request then carries the content to the Test branch with the same review and approval as any other, another release pipeline updates the Test workspace, and Prod repeats the pattern.

    Choose it when the repository must be the single source of truth and the origin of all deployments, when the team follows Gitflow with multiple primary branches, and when no build environment needs to alter the files before deployment.

    7 / 23
  8. Quick check

    A regulated team wants Git to be the origin of every deployment, with a reviewed primary branch feeding each of Dev, Test, and Prod. Which release design fits?

    1. ATrunk-based deployment from one Main branch through the Items APIs

      A single Main branch is the trunk-based shape, and it needs build scripts rather than reviewed per-stage branches.

    2. BGitflow, with a primary branch per stage workspace

      Right. Gitflow gives Dev, Test, and Prod a dedicated primary branch each, and every stage workspace is updated from Git.

    3. CGit connected to Dev only, with pipeline promotion afterwards

      With Git connected only through Dev, later stages are fed by workspace-to-workspace promotion, so Git is not the origin of every deployment.

    8 / 23

  9. Keep your progress in the app

    That’s 3 of 9 quick checks. In the app they stay answered, and every lesson remembers where you left off.

  10. Release option two: one branch and the Items APIs

    In the Fabric Items APIs option, all deployments come from the same branch — Main — and the branching strategy is trunk-based. Each stage has its own build and release pipeline, and those pipelines can spin up a build environment that runs unit tests and scripts that change item definitions before upload: the data source connection, the connections between items, or parameter values that must differ per stage. Definitions are then uploaded with Fabric's item definition APIs, using tooling such as the fabric-cicd Python library or the bulk import operation for item definitions.

    Two consequences distinguish this model. Test and Prod are not connected to Git at all; their content is pushed to them from Main. And not every dependency needs rewriting — some bind automatically through logical IDs when deployed to a new workspace — so the build scripts handle only what does not.

    9 / 23
  11. Quick check

    A trunk-based team keeps one Main branch and must rewrite connection and lakehouse identifiers before each stage receives its content. Which deployment mechanism fits?

    1. AFabric Git APIs, with each stage workspace connected to its own branch

      Per-stage branches updated through the Git APIs are the Gitflow model, which uploads files unaltered.

    2. BDeployment pipelines alone, with no build step in between

      Deployment pipelines promote between workspaces and offer no build environment in which a script could rewrite the definitions.

    3. CBuild scripts plus the Fabric Items APIs pushing from Main

      Right. A build environment rewrites workspace-specific attributes, and the Items APIs push the adjusted definitions from Main into each stage workspace.

    10 / 23

  12. Release option three: Git only through Dev

    Git integration can also stop at development. In this option the repository is connected only up to the Dev stage; from there, content moves directly between the Dev, Test, and Prod workspaces through Fabric deployment pipelines.

    The sequence is still a release process. Once a pull request to Main is approved and merged, a build pipeline uploads the changes to Dev through the Fabric Git APIs and can trigger post-deployment operations or tests there. A release pipeline then deploys Dev to Test, where automated and manual tests take place after deployment. When the tests are complete and the release manager approves, the deployment to Prod runs.

    11 / 23
  13. Release option three: Git only through Dev

    That option suits teams that use source control for development purposes only and prefer to deploy changes directly between the stages of the release pipeline.

    It also assumes the Fabric-native controls are enough: deployment rules, autobinding, and the available APIs to manage per-stage configuration, plus the other deployment pipeline features — viewing the changes inside Fabric before promoting, and deployment history. Two more conditions come with it: deployments in Fabric deployment pipelines have a linear structure, and creating and managing the pipeline needs permissions beyond the workspace connection.

    Many organizations end up combining options rather than picking one, so the models are worth recognizing by their constraints rather than by name.

    12 / 23
  14. Quick check

    In the Fabric-native option, how far up the release path does the Git connection reach?

    1. ATo the Dev workspace only

      Right. Git is connected only until the Dev stage, and deployment pipelines carry the content from Dev to Test and then Prod.

    2. BTo every stage, since each one syncs from Main

      Connecting every stage to a branch describes the Git-driven options, not this one.

    3. CTo Test, after which the pipeline takes over

      Test receives its content from the Dev workspace through the pipeline, so the Git connection never extends that far.

    13 / 23

  15. Leave the generated SQL project file alone

    The repository does not only hold object definitions. It also holds a SQL project file, which carries metadata about the database and is what lets Fabric bring extra functionality into source control and deployment pipelines.

    Fabric generates and updates that project file automatically. Manual edits to it are overwritten by source control integration on the next commit from Fabric, so anything you hand-write there is temporary. The one supported addition is local: to build the project on your own machine with tools such as SQL Server Management Studio or the SQL projects extension for Visual Studio Code, you can add a reference to the master.dacpac file.

    14 / 23
  16. Leave the generated SQL project file alone

    Three metadata properties are what Fabric adds to that file.

    Property Effect
    .sharedQueries folder excluded from the build The scripts stay tracked in source control without affecting database model validation.
    Pre-deployment and post-deployment scripts The scripts from .sharedQueries are registered as part of the project.
    System object references A package reference to master.dacpac, set up automatically with nothing to do.

    The exclusion is the subtle one: shared query scripts are versioned like everything else, but they are not treated as objects the database model must validate.

    15 / 23
  17. Quick check

    A developer edits the SQL project file that Fabric generated, adding a setting by hand. What becomes of that edit?

    1. AIt is applied to the database on the next update

      The update applies the object definitions and registered scripts; a hand-written project-file change does not survive to be applied.

    2. BIt is overwritten the next time Fabric commits the database

      Right. Fabric generates and maintains the project file, so its integration overwrites manual edits on the next commit from Fabric.

    3. CIt is kept, because Fabric ignores that file

      Fabric is precisely what maintains that file, which is why manual edits do not last.

    16 / 23

  18. Branch out, review, and merge back

    Branch out to new workspace, from the Branches tab of the Source control menu, is how a developer gets an isolated environment without leaving Fabric. Name the branch and the workspace, and Fabric creates both: the branch in the repository, populated with the committed contents of the branch the workspace is connected to, and the workspace in Fabric.

    For a SQL database, the new database contains the objects that were checked into source control — and its tables are new and empty. Definitions travel with the branch; data does not.

    17 / 23
  19. Branch out, review, and merge back

    Reviewing a change then follows normal team practice. Work on the database in the secondary branch workspace, commit those changes from the Source control panel, and open a pull request from the secondary branch to the primary branch in Azure DevOps or GitHub, where the difference in database code between the two workspaces is visible.

    Completing the pull request updates source control — and there it stops. The database in the primary Fabric workspace is not changed by the merge. To change the primary database, update the primary workspace from source control with the Update button on the Source control panel. That separation is useful: the release manager decides when merged definitions actually reach the primary database.

    18 / 23
  20. Quick check

    A pull request from a branch workspace is completed into the primary branch, but the primary workspace database has not changed. Why?

    1. AThe merge updates the repository; the workspace waits for an update

      Right. Completing the pull request updates source control, and the primary database changes only when that workspace is updated from source control.

    2. BThe merge only takes effect once the branch workspace is deleted

      Deleting the branch workspace has no part in applying merged definitions to the primary database.

    3. CThe merge failed, because a branch database holds no object definitions

      A branch database does contain the committed object definitions; only its tables are empty, and nothing here indicates a failure.

    19 / 23

  21. Send scripts along with the deployment

    Some database work has to accompany an update rather than follow it by hand, and that is what pre-deployment and post-deployment scripts are for. They are part of the SQL project, so they are versioned with everything else, and the same capability applies to deployment pipelines.

    Managing static data is the standard case. In the Fabric query editor, write a query containing a repeatable MERGE that sets the rows of a lookup table, rename it, move it to Shared Queries, and use its context menu to Set as Post-deployment Script. From then on it runs automatically as part of any update from source control and any deployment pipeline deployment, and it can be edited either in the Fabric query editor or locally in Visual Studio Code and committed like any other file.

    Scripts also cover a documented gap: database-level settings such as collation and compatibility level are not included in source control or deployment pipeline integration. For settings you can apply with T-SQL after the database is created, modify the database with scripts after deployment.

    20 / 23
  22. Quick check

    Static lookup rows must end up identical after a source-control update and after a deployment-pipeline release, and they must stay reviewable as code. What should the team use?

    1. AA manual data load run after each release

      A manual load is neither automatic nor reviewable, and it has to be repeated in both delivery paths.

    2. BA row inserted into the generated project file

      The project file holds database metadata and is regenerated by Fabric, so lookup rows placed there would not survive.

    3. CA post-deployment script kept in Shared Queries and marked as such

      Right. A script set as a post-deployment script in Shared Queries is versioned with the project and runs during both source-control updates and pipeline deployments.

    21 / 23

  23. Key takeaways

    • One workspace, one branch: Git integration connects a workspace to Azure DevOps or GitHub, and only the branch selected in workspace settings affects it. Isolate development in a local IDE or a separate workspace.
    • Two directions: committing reads live object definitions into the repository; updating validates the repository code and applies a differential change to the database.
    • Three release shapes: Gitflow with a branch per stage and the Git APIs; trunk-based with build scripts and the Items APIs, leaving Test and Prod disconnected from Git; or Git through Dev only, with deployment pipelines promoting between workspaces.
    • The project file belongs to Fabric: it is generated and updated automatically, manual edits are overwritten, and it excludes .sharedQueries from model validation while keeping those scripts in source control.
    • Merging is not deploying: a completed pull request updates the repository, and the primary workspace changes only when it is updated from source control. Branch-out brings definitions but leaves the new tables empty.
    • Use scripts for the rest: post-deployment scripts carry controlled static data through both delivery paths, and collation and compatibility level need scripts after deployment.
    22 / 23
  24. Quick check

    Which statement correctly separates commit, merge, and update in a Git-connected workspace?

    1. AThe selected branch updates the workspace by itself, and a completed pull request publishes the primary database

      Neither happens automatically: content reaches the workspace only when it is updated from source control.

    2. BCommitting captures object definitions, and a merged pull request reaches the workspace only through an update

      Right. Commit writes definitions to the repository, and the merge changes the repository while the workspace waits for an update.

    3. CThe generated project file is where lasting custom settings belong, and Test always receives its content from Git

      Fabric overwrites manual project-file edits, and in two of the three release options Test is fed by a workspace or a build environment rather than by Git.

    23 / 23

  25. 9 quick checks · then the test

    In the app, finishing the quick checks opens this lesson’s 10-question test, and the ones you miss come back exactly when you’re about to forget them.

The whole course, on your phone

Lessons you can read, audio you can listen to on the way to work, and practice that remembers what you got wrong.