Skip to main content
A dbt sync reads metadata from your dbt project and adds it to the matching Omni views. This page lists the metadata a sync can include, what each item becomes in Omni, and what a sync does not read. Omni includes some metadata in every sync, while the rest depends on the connection’s dbt settings.

Default dbt metadata

Every time Omni performs a , the following metadata is included by default: Omni matches dbt column names to dimension names without case sensitivity. Only columns that exist in the warehouse table are updated — documenting a column in dbt does not create a dimension in Omni. dbt column descriptions can be overridden in Omni by editing their definition in view files. To restore the definition and re-sync it from dbt, navigate to model mode and delete the column description.

Constraints

If you have native dbt primary_key and foreign_key constraints defined in your dbt project, you can include them in by enabling Auto-generate primary keys and relationships from dbt constraints in the connection’s dbt settings. When this setting is enabled, dbt syncs include the following:
Only native dbt constraints are supported. Constraints defined through a package (e.g., Snowflake-Labs/dbt_constraints) or constraints based on data tests are not supported.

Semantic layer

If you use dbt’s semantic layer, you can include the semantic layer’s metadata in in a few short steps. See Integrating dbt’s semantic layer with Omni for more information. When the semantic layer is enabled, dbt syncs include the following: Metrics with filters will have dimensions created as those filters in Omni. These dimensions are automatically hidden and applied to the corresponding Omni measure for an equivalent calculation.

What dbt syncs don’t remove

In the production dbt environment, a dbt sync (Model > Sync dbt metadata, or Sync now on the dbt IDE’s Sync page) and a soft schema refresh don’t remove relationships, primary keys, or semantic layer fields that an earlier sync added. To remove or change them, run a hard refresh of the entire model. After a dbt sync or soft refresh: A hard refresh generates relationships, primary keys, and semantic layer fields again from the current dbt project.
In other dbt environments, a sync also removes what you removed in dbt.

Next steps