Branching in Omni
What's a branch?
What's a branch?
If you’re familiar with git - and it’s okay if you’re not! - branches in Omni are similar.In Omni, a branch is an isolated space that allows you to make changes to a model and/or content without affecting the live versions, typically referred to as production. This enables you to experiment, update, and refine your changes before applying any modifications to the live environment.
Why use branches?
Why use branches?
To demonstrate why branches are useful, let’s look at an example that starts with a change to a shared model.When changes are made directly to a shared model, the model’s history might look like this:The changes in this example were immediately applied to the model. If a query had been using the modified field, its logic and results could have changed unexpectedly. These differences might not be noticed right away, potentially leading to incorrect conclusions or broken content.Now consider this example, where changes to the model and impacted documents were made together in a branch:In this example, the branch contained updates to the field logic and impacted documents. You could navigate to documents that use the field, open the branch, and make the changes required to ensure the updated data was correct.When everything worked as expected, you would then merge the branch, applying the changes to the live version of the model and publishing new versions of the documents at the same time.Want to learn more?Check out this blog post to learn more about why traditional development practices - like branches - are useful for modern data teams.
What's the difference between a branch and a document draft?
What's the difference between a branch and a document draft?
Unlike a document draft which is specific to a single document, branches can include changes to a model and multiple documents. This makes branches especially useful for updating a model and any impacted content at the same time.Branches shouldn’t be thought of as entirely separate from document drafts - they act more as a layer of additional functionality on top of document drafts. When content changes are made in a branch, a draft of each modified document is attached to the branch. Publishing the branch publishes new versions of the documents.Refer to the Editing & publishing guide for a detailed overview, including a comparison between drafts and branches.
Where can branches be used?
Where can branches be used?
Branches can be used in the model IDE) and documents.
Who can use branches?
Who can use branches?
Your connection permissions determine the level of access you have to branches:
Note: Create branches also includes the ability to make changes within a branch.
| View branches | Create branches | Merge branches | |
|---|---|---|---|
| Viewer | X No | X No | X No |
| Restricted Queriers | X No | X No | X No |
| Queriers | ✓ Yes | ✓ Yes | X No |
| Modelers | ✓ Yes | ✓ Yes | ✓ Yes |
| Connection Admins | ✓ Yes | ✓ Yes | ✓ Yes |
Do branches work with the git & dbt integrations?
Do branches work with the git & dbt integrations?
Yes, but only for changes to models. If a branch includes content changes, those changes will not be pushed to the connected git repository. However, the drafts of the content will be published when the branch is merged.When the git is configured for a connection, Branch Mode is required to make changes to the connection’s models. The dbt integration uses branches to enable switching dbt environments.
Creating branches
Connection Admin, Modeler, or Querier permissions are required to create branches.
- In a workbook or the model IDE, click Model > New branch or Model > Branch > New branch.
-
When prompted, enter a name for the branch.
Want to group branches in the branch menu?
- Click Create.
-
A green and pink header will display at the top of the page, indicating that you’re in the branch:

Editing documents
Connection Admin, Modeler, or Querier permissions are required to edit documents in branches.
Moving drafts to branches
Branches can include changes to multiple documents. If the draft you want to move uses the same model as any documents in the branch, you can attach it to a branch. To attach an existing draft to a branch:- Open the draft.
- Click File > Move to branch.
- Select the branch. The draft header at the top of the page will be updated to include the branch.
Viewing document changes
For every change you make in a document, an entry will be added to the Draft changes panel. Click See changes in the branch header or View workbook changes on the left side of the page to open the panel:
Editing models
Connection Admin, Modeler, or Querier permissions are required to edit models in branches.

Viewing staged model changes
Each time you save a change in the IDE, an entry will be added to the Model history panel. Open this panel to view the changes currently on the branch, as well as the before and after (also called a diff) of each change:

Validating changes with the Content Validator
As you make changes to the model, Omni recommends using the Content Validator to check your work. This tool makes it easy to identify issues in content and proactively address them. Refer to the Content Validator guide for more information and the Common publishing workflows guide to learn how to incorporate validation into your development strategy.Publishing & merging branches
Connection Admin or Modeler permissions are required to merge branches.

- In the branch header at the top of the page, click Publish content drafts or Merge (which will display if the branch contains model changes).
-
You’ll be prompted to confirm the merge. Note: If the branch contains modeling changes, you’ll also see a Delete branch after merge box. Omni recommends leaving this checked.

- Click Merge branch.
Working with out of date drafts
There may be times when you see the following out of date warning when preparing to publish content:
- Identify the changes in the outdated draft.
- Discard the draft.
- Create a new draft of the document.
- In the new draft, redo any changes you identified in step 1.
- When finished with all your changes, merge the branch.