---
title: dbt - Deployment
description: Run the generated dbt project with dbt run to create the tables and views of your solution and load them.
---

[Skip to content](https://knowledge.bigenius-x.com/dbt-deployment#main-content)

[Contact us](https://knowledge.bigenius-x.com/kb-tickets/new?hsLang=en) [Go to Customer Portal](https://knowledge.bigenius-x.com/customer-portal?hsLang=en)

[![TRI\_Logo\_biGENIUS\_2020\_RGB\_s](https://knowledge.bigenius-x.com/hs-fs/hubfs/Marketing/TRI_Logo_biGENIUS_2020_RGB_s.png?width=150&height=42&name=TRI_Logo_biGENIUS_2020_RGB_s.png)](https://www.bigenius-x.com/)

Open main navigation

Close main navigation

- [Contact us](https://knowledge.bigenius-x.com/kb-tickets/new)
- [Go to Customer Portal](https://knowledge.bigenius-x.com/customer-portal)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [biGENIUS-X Knowledge Base](https://knowledge.bigenius-x.com/?hsLang=en)
2. [Generators](https://knowledge.bigenius-x.com/generators?hsLang=en)
3. [Deployment](https://knowledge.bigenius-x.com/generators?hsLang=en#deployment)

# dbt - Deployment

**Applies to**  
Platform: Snowflake dbt · Databricks dbt

Run the generated dbt project with `dbt run` to create the tables and views of your solution and load them. dbt builds the models in dependency order, from Stage through Raw Vault to Business Vault. Afterwards the target schemas hold the loaded tables, and each later run adds the new source data.

A dbt project has no separate deployment and no load control. The first `dbt run` creates the objects, and every run loads them in the order of their references. dbt takes the place of the load control described in [Understand Load Control](https://knowledge.bigenius-x.com/understand-load-control?hsLang=en).

### Prerequisites

- The target environment is prepared: 
    - Snowflake dbt: [Target environment](https://knowledge.bigenius-x.com/snowflake-dbt-target-environment?hsLang=en)
    - Databricks dbt: [Target environment](https://knowledge.bigenius-x.com/databricks-dbt-target-environment?hsLang=en)
- The artifacts are [generated](https://knowledge.bigenius-x.com/generate-artifacts?hsLang=en) and [downloaded](https://knowledge.bigenius-x.com/download-generated-artifacts?hsLang=en).
- The values in `dbt_project.yml` are set, see [dbt - Placeholder values](https://knowledge.bigenius-x.com/dbt-placeholder-values?hsLang=en).
- dbt 2 is not supported with Snowflake dbt or Databricks dbt.

### Run the project for the first time

1. Open a terminal in the artifacts folder, the folder that contains `dbt_project.yml`.
2. Run `dbt debug`. The output ends with `All checks passed!`.
3. Run `dbt run`. dbt prints a line for each model it starts and finishes, and a summary at the end.

On the first run, each model of an object with Implementation Type `Permanent` creates its table from the model's SQL. A Hub table, for example, receives the business keys of the source and the unknown-member row. Objects with Implementation Type `Cached`, such as Stage by default, create tables. `_source` models and `Virtual` objects create views.

### Load new source data

Run `dbt run` again whenever the sources hold new data. On later runs the models behave as follows:

- Stage tables are rebuilt with the current source data.
- Hub and Link models insert only keys that are not yet in their table. Satellite models insert new versions.
- The post-hook `bg_close_validity_merge` of historized satellites and PITs sets `BG_ValidToTimestamp` of the previous version.
- All models of one run write the same `BG_LoadTimestamp`: the start time of the dbt run, in whole seconds.
- New terms of a model object become new columns of the existing table. Columns of removed terms stay in the table.
- Columns of existing terms keep their data type, also when you change the data type of the term. The run reports no error or warning for this. To give the table the new data type, run the model with `--full-refresh`. Read the warnings in [Full refresh](https://knowledge.bigenius-x.com/dbt-deployment#full-refresh) first.

A model reads only new source rows when its `BG_IncrementalFilter` is mapped to the source's `BG_LoadTimestamp`. It then reads the rows whose `BG_LoadTimestamp` is later than the latest one in its table. Without this mapping it reads all source rows on every run. When `BG_IncrementalFilter` is mapped to another term, validation reports the warning `Model object has an incremental filter that is not mapped to the source's BG_LoadTimestamp. No dbt incremental read filter applied.` See [Configure an incremental load](https://knowledge.bigenius-x.com/configure-an-incremental-load?hsLang=en).

### Run part of the project

Use `--select` with the [dbt selection syntax](https://docs.getdbt.com/reference/node-selection/syntax). The model names follow [dbt - Artifacts](https://knowledge.bigenius-x.com/dbt-artifacts?hsLang=en). Examples:

- `dbt run --select path:models/rawvault` runs only the Raw Vault models and reads the existing Stage tables.
- `dbt run --select +<model name>` runs a model and every model it reads from.
- `dbt run --select <model name>+` runs a model and every model that reads from it.
- `dbt run --select source:<source system>+` runs the models that read from a source system, directly or indirectly.

### Model objects with more than one dataflow

A model object with more than one dataflow has an owner model with the model object's name and one loader per dataflow. The owner model creates the empty table on the first run, with the unknown-member row where the type has one. Each loader `<model name>_<dataflow name>_loader` then inserts the rows of its dataflow, after the loader of the previous dataflow.

The owner model reads no source. A selection such as `source:<source system>+` therefore leaves it out, while `+<model name>` with the name of a loader model includes it. On a first run with `source:<source system>+` the owner table does not exist yet. The loaders, and models that read the owner table, fail. Databricks dbt reports `[TABLE_OR_VIEW_NOT_FOUND] The table or view `<target catalog>`.`<profile schema>_<layer schema>`.`<model name>` cannot be found.` Snowflake dbt reports the names in upper case: `Table '<database>.<profile schema>_<layer schema>.<model name>' does not exist or not authorized.`

With the incremental read filter, each loader reads the new source rows of its own dataflow. If validation shows the warning ID-34001, clear the mapping of `BG_IncrementalFilter` to read all rows of every dataflow. The warning reads `Model object uses a dbt incremental read filter with a single global watermark on a multi-dataflow object, which may miss data.` See [dbt incremental read filter not applied (Business Rule)](https://knowledge.bigenius-x.com/dbt-incremental-read-filter-not-applied-business-rule?hsLang=en). On the first run, every loader reads all rows of its dataflow, because the source views are created before the table.

### Full refresh

With `--full-refresh`, dbt drops the tables of Hubs, Links, Satellites and the other Raw Vault and Business Vault objects and rebuilds them from the data that the sources hold now. History that the sources no longer hold is lost. Back up these tables before a full refresh, or exclude them from the selection.

`dbt run --full-refresh` builds the selected models as on the first run. For an existing table of a `bg_` materialization, dbt drops the table and creates it again from the model's SQL. Loaders skip the full refresh, so a refreshed owner table is created empty and the loaders insert the rows of their dataflows again.

A full refresh of a Mart Dimension assigns new surrogate keys. Mart Facts with the Fact Load Strategy Insert keep the keys of their earlier loads. Refresh these facts in the same run.

A full refresh of a Raw Vault or Business Vault object gives all its rows a new load timestamp. Mart Facts with the Fact Load Strategy Insert that read the object with the incremental read filter insert these rows again. Refresh these Mart Facts in the same run.

### Data Mart projects on Databricks dbt

- A project with the configuration [`Databricks Dbt DataMart`](https://knowledge.bigenius-x.com/databricks-dbt-data-mart?hsLang=en) reads the tables of its linked projects as dbt sources. dbt does not run the linked project, so load it before you run this project.
- In a project with the configuration [`Databricks Dbt DataVault & Mart`](https://knowledge.bigenius-x.com/databricks-dbt-data-vault-and-mart?hsLang=en), one `dbt run` builds Stage, Raw Vault, Business Vault and Mart in dependency order. `--select path:models/mart` runs only the Mart models on the existing vault tables. `--select +<model name>` on a Mart model includes the vault and Stage models it reads.

### Check the result

A run without errors ends with `Completed successfully`, followed by a line that starts with `Done. PASS=` and counts the models. Query a table of each layer to check the rows, for example `SELECT * FROM <target catalog>.<profile schema>_rawvault.rdv_hub_common_customer`.

### Example

To load the Satellite `common_customer` together with the models it depends on, first list the selection:

```
dbt ls --select +rdv_sat_common_customer --output name
```

dbt lists eight models and two source tables. The Satellite and its Hub read the Stage objects `st_customer` and `st_phonenumber`, which read the tables of the source system `bfmmssql`:

```
rdv_hub_common_customer
rdv_hub_common_customer_source
rdv_sat_common_customer
rdv_sat_common_customer_source
stg_st_customer
stg_st_customer_source
stg_st_phonenumber
stg_st_phonenumber_source
bfmmssql.customer
bfmmssql.phonenumber
```

`dbt run --select +rdv_sat_common_customer` runs the eight models in dependency order: the Stage models first, then the Hub, then the Satellite.

### Failure symptoms and recovery

#### dbt does not find the profile

Message: `Could not find profile named '<placeholder>'`  
Cause: `profile` in `dbt_project.yml` is not set.  
Fix: Set the values as described in [dbt - Placeholder values](https://knowledge.bigenius-x.com/dbt-placeholder-values?hsLang=en) and run again.

#### dbt does not find a source table

Message: `[TABLE_OR_VIEW_NOT_FOUND] The table or view `<placeholder>`.`<placeholder>`.`<table>` cannot be found.` or `SQL compilation error: syntax error line <line> at position <position> unexpected '<'.`  
Cause: The source variables in `dbt_project.yml` are not set. Databricks dbt reports the first message, Snowflake dbt the second.  
Fix: Set the values as described in [dbt - Placeholder values](https://knowledge.bigenius-x.com/dbt-placeholder-values?hsLang=en) and run again.

#### A model stops after the partitioning changed

Message: `Partition columns changed for <table name> — Delta Lake does not support ALTER TABLE to change partitioning. Run with --full-refresh to recreate the table.`  
Cause: [Optimization Method](https://knowledge.bigenius-x.com/optimization-method-model-object?hsLang=en) or [Optimization Method Columns](https://knowledge.bigenius-x.com/optimization-method-columns-model-object?hsLang=en) of the model object now gives other partition columns than the existing table has. Databricks dbt only; changes of `Cluster By` are applied with `ALTER TABLE` without an error. The model inserts its new rows before the check stops it, and its post-hooks do not run, so the previous versions stay open.  
Fix: Set the previous partition columns again, or recreate the table of this model with a full refresh. Read the warning in [Full refresh](https://knowledge.bigenius-x.com/dbt-deployment#full-refresh) first: the table loses the history that the sources no longer hold. After you set the previous partition columns again, the next run closes the versions left open and inserts no row twice.

#### A full refresh stops at a NOT NULL constraint

Message: `[DELTA_NEW_NOT_NULL_VIOLATION] <number> rows in <target catalog>.<profile schema>_<layer schema>.<table> violate the new NOT NULL constraint on <column>.`  
Cause: Databricks dbt only. A source row of the model holds NULL in a column that the model sets to NOT NULL. dbt has already recreated the table with the current source rows, including that row. The table then has no NOT NULL constraint, no primary key and no foreign key, and the post-hooks did not run. On Snowflake dbt, such a row stops the Stage model on every run with `NULL result in a non-nullable column`. The Stage table keeps the rows of the previous run.  
Fix: Correct the source rows and run the full refresh of the model again. The run sets the NOT NULL constraints and the keys again.

#### A model fails its enforced contract

Message: `This model has an enforced contract that failed.`, followed by a table that lists the column, its two data types and `data type mismatch`.  
Cause: An expression in a term mapping returns a data type other than that of the term. The source view returns the expression without a cast, and its contract checks the data types, see [dbt - Artifacts](https://knowledge.bigenius-x.com/dbt-artifacts?hsLang=en). On Databricks dbt, `decimal` for an `int` term fails the contract. Snowflake dbt compares only the type family, for example `TEXT` and `FIXED` for a text expression in a number term. A decimal expression in an integer term passes there, and the table stores the rounded value.  
Fix: Change the expression so that it returns the data type of the term, for example `CAST(<expression> AS INT)`, generate the artifacts again and run the model again.

#### A model fails and dbt skips the models that depend on it

Cause: An error in one model, for example a missing source table. dbt marks the models that read from it as skipped.  
Fix: Correct the cause, then run `dbt retry`. dbt runs the failed and skipped models of the previous run again. Rows that the failed run inserted are not inserted again, and the post-hooks of the rerun close versions left open.

For failures in other steps, see [Troubleshoot generation, deployment and load failures](https://knowledge.bigenius-x.com/troubleshoot-generation-deployment-and-load-failures?hsLang=en).

### Platform differences

- Snowflake dbt: each layer runs on the warehouse of its `+snowflake_warehouse` value. The project has no `process_config_changes` macro, so the partition check of [A model stops after the partitioning changed](https://knowledge.bigenius-x.com/dbt-deployment#a-model-stops-after-the-partitioning-changed) does not apply.
- Databricks dbt: the macro `process_config_changes` compares the partitioning, clustering and table properties of existing tables with the model, and stops a model whose partition columns changed.

### Related articles

- Previous: [Generate artifacts](https://knowledge.bigenius-x.com/generate-artifacts?hsLang=en), [Download generated artifacts](https://knowledge.bigenius-x.com/download-generated-artifacts?hsLang=en), [dbt - Placeholder values](https://knowledge.bigenius-x.com/dbt-placeholder-values?hsLang=en) 
    - Snowflake dbt: [Target environment](https://knowledge.bigenius-x.com/snowflake-dbt-target-environment?hsLang=en)
    - Databricks dbt: [Target environment](https://knowledge.bigenius-x.com/databricks-dbt-target-environment?hsLang=en)
- Reference: [Implementation Type (Model Object)](https://knowledge.bigenius-x.com/implementation-type-model-object?hsLang=en), [Optimization Method (Model Object)](https://knowledge.bigenius-x.com/optimization-method-model-object?hsLang=en), [Optimization Method Columns (Model Object)](https://knowledge.bigenius-x.com/optimization-method-columns-model-object?hsLang=en), [Persist Validity (Project)](https://knowledge.bigenius-x.com/persist-validity-project?hsLang=en)
- See also: [dbt - Artifacts](https://knowledge.bigenius-x.com/dbt-artifacts?hsLang=en), [Configure an incremental load](https://knowledge.bigenius-x.com/configure-an-incremental-load?hsLang=en), [Understand Load Control](https://knowledge.bigenius-x.com/understand-load-control?hsLang=en), [Troubleshoot generation, deployment and load failures](https://knowledge.bigenius-x.com/troubleshoot-generation-deployment-and-load-failures?hsLang=en)

- [Getting started](https://knowledge.bigenius-x.com/getting-started?hsLang=en#main-content)

    - [Guidelines](https://knowledge.bigenius-x.com/getting-started?hsLang=en#guidelines)
    - [Start working](https://knowledge.bigenius-x.com/getting-started?hsLang=en#start-working)
    - [Account](https://knowledge.bigenius-x.com/getting-started?hsLang=en#account)
- [General overview](https://knowledge.bigenius-x.com/general-overview?hsLang=en)
- [Artificial Intelligence](https://knowledge.bigenius-x.com/artificial-intelligence?hsLang=en#main-content)

    - [MCP server](https://knowledge.bigenius-x.com/artificial-intelligence?hsLang=en#mcp-server)
- [Application Modules](https://knowledge.bigenius-x.com/application-modules?hsLang=en#main-content)

    - [Administration](https://knowledge.bigenius-x.com/application-modules?hsLang=en#administration)
    - [Solutions](https://knowledge.bigenius-x.com/application-modules?hsLang=en#solutions)
    - [Global Features](https://knowledge.bigenius-x.com/application-modules?hsLang=en#global-features)
    - [Projects](https://knowledge.bigenius-x.com/application-modules?hsLang=en#projects)
    - [Branches](https://knowledge.bigenius-x.com/application-modules?hsLang=en#branches)
    - [Data Connections](https://knowledge.bigenius-x.com/application-modules?hsLang=en#data-connections)
    - [Dataflow Modeling - Overview](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-overview)
    - [Dataflow Modeling - Wizard Steps](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-wizard-steps)
    - [Dataflow Modeling - Terms](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-terms)
    - [Dataflow Modeling - Term Mapping](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-term-mapping)
    - [Dataflow Modeling - Relationships](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-relationships)
    - [Dataflow Modeling - Data Quality](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-data-quality)
    - [Dataflow Modeling - Indexes](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-indexes)
    - [Relationship Modeling](https://knowledge.bigenius-x.com/application-modules?hsLang=en#relationship-modeling)
    - [Generate Artifacts](https://knowledge.bigenius-x.com/application-modules?hsLang=en#generate-artifacts)
    - [Project Settings](https://knowledge.bigenius-x.com/application-modules?hsLang=en#project-settings)
    - [Data Marketplace](https://knowledge.bigenius-x.com/application-modules?hsLang=en#data-marketplace)
- [Generators](https://knowledge.bigenius-x.com/generators?hsLang=en#main-content)

    - [Databricks](https://knowledge.bigenius-x.com/generators?hsLang=en#databricks)
    - [Databricks dbt](https://knowledge.bigenius-x.com/generators?hsLang=en#databricks-dbt)
    - [Fabric Lakehouse](https://knowledge.bigenius-x.com/generators?hsLang=en#fabric-lakehouse)
    - [Fabric Warehouse](https://knowledge.bigenius-x.com/generators?hsLang=en#fabric-warehouse)
    - [Microsoft SQL Server](https://knowledge.bigenius-x.com/generators?hsLang=en#microsoft-sql-server)
    - [Oracle](https://knowledge.bigenius-x.com/generators?hsLang=en#oracle)
    - [Snowflake](https://knowledge.bigenius-x.com/generators?hsLang=en#snowflake)
    - [Snowflake dbt](https://knowledge.bigenius-x.com/generators?hsLang=en#snowflake-dbt)
    - [Artifacts](https://knowledge.bigenius-x.com/generators?hsLang=en#artifacts)
    - [Replace Placeholders](https://knowledge.bigenius-x.com/generators?hsLang=en#replace-placeholders)
    - [Target solution environment](https://knowledge.bigenius-x.com/generators?hsLang=en#target-solution-environment)
    - [Deployment](https://knowledge.bigenius-x.com/generators?hsLang=en#deployment)
    - [Deployment with an Azure DevOps pipeline](https://knowledge.bigenius-x.com/generators?hsLang=en#deployment-with-an-azure-devops-pipeline)
    - [Delta Deployment](https://knowledge.bigenius-x.com/generators?hsLang=en#delta-deployment)
    - [Load control environment](https://knowledge.bigenius-x.com/generators?hsLang=en#load-control-environment)
    - [Load data with a native load control](https://knowledge.bigenius-x.com/generators?hsLang=en#load-data-with-a-native-load-control)
    - [Load data with Apache Airflow](https://knowledge.bigenius-x.com/generators?hsLang=en#load-data-with-apache-airflow)
    - [Model Object Type](https://knowledge.bigenius-x.com/generators?hsLang=en#model-object-type)
    - [Properties](https://knowledge.bigenius-x.com/generators?hsLang=en#properties)
    - [Default Terms](https://knowledge.bigenius-x.com/generators?hsLang=en#default-terms)
- [Discovery application](https://knowledge.bigenius-x.com/discovery-application?hsLang=en#main-content)

    - [Discovery configurations](https://knowledge.bigenius-x.com/discovery-application?hsLang=en#discovery-configurations)
- [Best practices](https://knowledge.bigenius-x.com/best-practices?hsLang=en#main-content)

    - [Modeling Approaches](https://knowledge.bigenius-x.com/best-practices?hsLang=en#modeling-approaches)
    - [Use Cases](https://knowledge.bigenius-x.com/best-practices?hsLang=en#use-cases)
    - [Business Rules](https://knowledge.bigenius-x.com/best-practices?hsLang=en#business-rules)
    - [Data Quality Rules](https://knowledge.bigenius-x.com/best-practices?hsLang=en#data-quality-rules)
- [FAQs](https://knowledge.bigenius-x.com/faqs?hsLang=en)
- [Product Release Notes](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#main-content)

    - [SaaS Application](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#saas-application)
    - [Discovery application](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#discovery-application)
    - [Generators](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#generators)
    - [MCP server](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#mcp-server)
- [Legal Documents](https://knowledge.bigenius-x.com/legal-documents?hsLang=en#main-content)

    - [Current legal docs](https://knowledge.bigenius-x.com/legal-documents?hsLang=en#current-legal-docs)
    - [Software Product and Limits](https://knowledge.bigenius-x.com/legal-documents?hsLang=en#software-product-and-limits)

- [Contact us](https://knowledge.bigenius-x.com/kb-tickets/new?hsLang=en)
- [Customer Portal](https://knowledge.bigenius-x.com/customer-portal)
- [Sign in](https://knowledge.bigenius-x.com/_hcms/mem/login)

[![biGENIUS logo](https://knowledge.bigenius-x.com/hubfs/TRI_Logo_biGENIUS_2020_RGB-1.svg "biGENIUS logo")](https://www.bigenius-x.com)

<https://www.linkedin.com/company/bigenius> <https://www.youtube.com/@biGENIUS_DWA>

All rights reserved © 2025, biGENIUS AG