Requirements
To follow the steps in this guide, you’ll need an Omni connection with a configured dbt integration.Creating new dbt models from Omni queries
- In a workbook, open the query you want to use to convert to a dbt model.
-
Click Model > Convert to dbt model. Omni will convert the query to dbt SQL and update to display a dbt mode banner above the field browser:

- Use the SQL editor to refine the model. You can run the query periodically to verify the output.
- Click Model > Push to dbt repo.
-
In the Push to dbt dialog:

- Model name — The filename for the new
.sqlfile. Make sure this is unique — if it matches an existing model name, it will overwrite that file. - Git branch — The branch to push to
- Commit message — A description of the change
- Model name — The filename for the new
- Click Push.
- You’ll be prompted to create a pull request in the dbt git repository. Complete the pull request process, following your organization’s process.
Editing dbt models in Omni
Modeler or Connection Admin permissions are required to edit dbt models.
- Navigate to Develop and select your model.
- In the model IDE, click the dbt icon in the sidebar.
- In the file list, click the dbt model you want to edit.
-
Click the Open in workbook button near the top right corner of the page:

- The model will open in a new workbook. Use the SQL editor to iterate on the model.
- When finished, click Model > Push to dbt repo and follow the same push flow as creating a new model.
Preventing overwrites to existing models
When you convert a workbook query and push it to your dbt repository, Omni checks the Model name against your existing project. When pushing a model, Omni uses the Model name to determine whether to create a new file or update an existing one. If the name matches an existing dbt model, Omni treats the push as an update rather than a new addition. To create a brand-new.sql file instead of overwriting:
- Open the Push to dbt dialog.
- Edit the Model name field to a unique name.
- Confirm the push to generate the new file in your repository.
Next steps
- Trigger a schema refresh — Bring newly built or updated dbt models into Omni.

