Skip to main content
Keeping your BI tool in sync with your database when schema changes occur can be a challenge. As such, there may be times when you need to manually refresh the schema model - or make Omni aware of the changes - that your Omni model is built on.

Triggering schema refreshes

Schema refreshes can be triggered manually, automated on a schedule, or via API. When you kick off a refresh, this starts a job that runs in the background. This can take several minutes depending on the size of the database. There are two types of schema refreshes:
TypeSummaryWhat will be reflected in Omni?
Hard refreshIncorporates all changes New objects
Updated objects
Removed objects
Soft refreshIncorporates only additive changes New objects
Updated objects
Removed objects
Performing a schema refresh for dbt differs slightly than those performed on a “regular” database schema. Specifically, Omni will:
  • Search the schema for views that correspond to dbt models and add dbt metadata to them
  • If available, generate primary key definitions and relationships based on constraints

Hard refreshes

Hard refreshes of the entire model are required to remove dropped schemas and tables in the Omni model.
Hard refreshes are typically performed manually. To trigger this type of refresh:
  • Use Model > Refresh schema in the model IDE. Note: Performing a hard refresh with this option requires that you refresh the entire model. Specifying individual schemas or tables will perform a soft refresh.
  • Navigate to Settings > Connections, open the connection, and click Refresh now
  • Use the Refresh schema API

Soft refreshes

Soft refreshes include scheduled refreshes and selectively refreshing schemas and tables.
To schedule a refresh, navigate to Settings > Connections and open a connection. Click the Schedule button to define a cron schedule to refresh the connection’s schema:
Cron string

You could schedule a refresh after your daily ETL pipeline runs so data is always up-to-date

Omni uses Amazon Web Services (AWS) syntax for cron expressions. Refer to the AWS documentation for more information and examples.
To selectively refresh schemas and tables, navigate to Model > Refresh schema. In the dialog that displays, add the objects you want to refresh by listing them individually or using wildcard syntax. For example, sales_*.

Requiring branches for schema refreshes

If you prefer to review schema changes before they impact the shared model, enable the connection’s Branch based schema refresh setting. This will schema refreshes to be performed in an Omni branch before they can be promoted to the shared model. When this setting is enabled:
  • On-demand and scheduled refreshes will be disabled
  • Schema refreshes can only be triggered from the IDE. If you’re not in an existing branch, selecting Model > Refresh schema will prompt you to create a branch first.
Branch-based schema refreshes can’t be enabled if a connection has multiple models or if connection environments (dynamic connections) are currently in use.

Resolving broken references

Changes made as a result of a schema refresh may result in broken references in Omni. Use the Content Validator to identify and resolve any issues.