---
title: Snowflake dbt - Target environment
description: Prepare a Snowflake account and a dbt installation to run the dbt project that the Snowflake dbt generator creates.
---

[Skip to content](https://knowledge.bigenius-x.com/snowflake-dbt-target-environment#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. [Target solution environment](https://knowledge.bigenius-x.com/generators?hsLang=en#target-solution-environment)

# Snowflake dbt - Target environment

**Applies to**  
Platform: Snowflake dbt

Prepare a Snowflake account and a dbt installation to run the dbt project that the Snowflake dbt generator creates. Do this once per environment, before the first run. Afterwards `dbt debug` connects from the artifacts folder to your account.

A Snowflake dbt project has no deployment scripts and no load control: dbt creates and loads the tables itself. The native Snowflake generators use the environment described in [Snowflake - Target environment](https://knowledge.bigenius-x.com/snowflake-target-environment?hsLang=en) instead.

### Prerequisites

- A Snowflake account and a user for dbt that signs in with key-pair authentication. Password-only sign-ins are blocked by the Snowflake strong-authentication rules.
- A target database. dbt creates the schemas in it, but not the database.
- The source tables in a database and schema of the account. To create the source model objects from them, see [Discover a Snowflake database](https://knowledge.bigenius-x.com/discover-a-snowflake-database?hsLang=en).
- Python with pip on the machine that runs dbt.
- With [Apply Sensitivity Level Tags](https://knowledge.bigenius-x.com/apply-sensitivity-level-tags-project?hsLang=en) on: Snowflake Enterprise Edition or higher. The macro that creates the tag fails on Standard Edition.

### Prepare Snowflake

1. Create the target database, for example `DWH` for all layers.
2. Choose a warehouse for each layer, or one warehouse for all of them, for example `COMPUTE_WH`. You enter it in the profile and in `dbt_project.yml`.
3. Give a role the privileges to create and load the objects, and grant the role to the dbt user. For example, the owner of the target database can create the schemas, tables and views:

```
GRANT OWNERSHIP ON DATABASE DWH TO ROLE <role>;
GRANT USAGE ON WAREHOUSE COMPUTE_WH TO ROLE <role>;
GRANT ROLE <role> TO USER <dbt user>;
```

Here `<role>` is the role of the dbt user and `<dbt user>` its user name. The role also needs read access to the source tables and usage on every warehouse that `dbt_project.yml` names. With Apply Sensitivity Level Tags on, the same role creates the tag and sets it on the columns; the privileges are listed in [Apply Sensitivity Level Tags (Project)](https://knowledge.bigenius-x.com/apply-sensitivity-level-tags-project?hsLang=en).

### Install dbt

1. Run `pip install dbt-snowflake`. pip installs the adapter dbt-snowflake together with dbt Core.
2. Run `dbt --version`. The output lists the version of Core and, under Plugins, the version of `snowflake`.

Verified with dbt Core 1.12.6 and dbt-snowflake 1.12.5. dbt 2 is not supported with Snowflake dbt.

### Create the connection profile

1. Open `profiles.yml` in the `.dbt` folder of your user profile, or create it there.
2. Add a profile with `type: snowflake` and the values below. The [Snowflake setup](https://docs.getdbt.com/docs/core/connect-data-platform/snowflake-setup) page of the dbt documentation lists the other authentication methods.
3. Enter the profile name as `profile` in `dbt_project.yml` of the artifacts, together with the other values of [dbt - Placeholder values](https://knowledge.bigenius-x.com/dbt-placeholder-values?hsLang=en).

The values of the profile:

- `account`: the account identifier, for example `<organization>-<account name>`.
- `user` and `role`: the dbt user and its role.
- `private_key_path` and `private_key_passphrase`: the private key file of the user and its passphrase. Keep the passphrase out of the file, for example with `env_var()`.
- `database`: the target database.
- `warehouse`: the warehouse of the connection. A layer whose `+snowflake_warehouse` in `dbt_project.yml` names another warehouse runs on that one.
- `schema`: the first part of every target schema. dbt creates the models of a layer in the schema `<profile schema>_<layer schema>`, for example `ANALYTICS_RAWVAULT`.
- `threads`: the number of models that dbt runs at the same time.

### Example

A profile `dwh` for the target database `DWH`. The values in angle brackets are those of your account; `SNOWFLAKE_KEY_PASSPHRASE` is an environment variable that holds the passphrase:

```
dwh:
  target: dev
  outputs:
    dev:
      type: snowflake
      account: <account identifier>
      user: <dbt user>
      role: <role>
      private_key_path: <path to rsa_key.p8>
      private_key_passphrase: "{{ env_var('SNOWFLAKE_KEY_PASSPHRASE') }}"
      database: DWH
      warehouse: COMPUTE_WH
      schema: ANALYTICS
      threads: 4
```

With `profile: 'dwh'` and the layer schema `rawvault` in `dbt_project.yml`, dbt writes the Hub `common_customer` to `DWH.ANALYTICS_RAWVAULT.RDV_HUB_COMMON_CUSTOMER`. Snowflake stores the unquoted names in upper case.

### Check the result

This check needs the downloaded artifacts with `profile` set, see [dbt - Placeholder values](https://knowledge.bigenius-x.com/dbt-placeholder-values?hsLang=en). Open a terminal in the artifacts folder, the folder that contains `dbt_project.yml`, and run `dbt debug`. dbt checks `profiles.yml`, `dbt_project.yml` and the connection. The output ends with:

```
All checks passed!
```

### Failure symptoms and recovery

#### dbt does not find the profile

Message: `Could not find profile named '<profile name>'`  
Cause: `profile` in `dbt_project.yml` names a profile that `profiles.yml` does not contain. In downloaded artifacts it is `<placeholder>`.  
Fix: Enter the name of your profile as `profile` in `dbt_project.yml` and run `dbt debug` again.

#### The tag cannot be created

Message: `001420 (22023): SQL compilation error: invalid property 'PROPAGATE' for 'TAG'`  
Cause: `dbt run-operation create_governance_tags` ran in an account with Standard Edition. The tag uses a parameter that needs Enterprise Edition or higher.  
Fix: Run the project in an account with Enterprise Edition or higher, or switch Apply Sensitivity Level Tags off.

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).

### Related articles

- Next: [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), [dbt - Deployment](https://knowledge.bigenius-x.com/dbt-deployment?hsLang=en)
- Reference: [Snowflake dbt - DataVault](https://knowledge.bigenius-x.com/snowflake-dbt-datavault?hsLang=en), [Apply Sensitivity Level Tags (Project)](https://knowledge.bigenius-x.com/apply-sensitivity-level-tags-project?hsLang=en)
- See also: [dbt - Artifacts](https://knowledge.bigenius-x.com/dbt-artifacts?hsLang=en), [Discover a Snowflake database](https://knowledge.bigenius-x.com/discover-a-snowflake-database?hsLang=en), [Snowflake - Target environment](https://knowledge.bigenius-x.com/snowflake-target-environment?hsLang=en), [Generators Release - 2.4.0](https://knowledge.bigenius-x.com/generators-release-2.4.0?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)
- [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)

    - [Fabric Warehouse](https://knowledge.bigenius-x.com/generators?hsLang=en#fabric-warehouse)
    - [Fabric Lakehouse](https://knowledge.bigenius-x.com/generators?hsLang=en#fabric-lakehouse)
    - [Databricks](https://knowledge.bigenius-x.com/generators?hsLang=en#databricks)
    - [Snowflake](https://knowledge.bigenius-x.com/generators?hsLang=en#snowflake)
    - [Microsoft SQL Server](https://knowledge.bigenius-x.com/generators?hsLang=en#microsoft-sql-server)
    - [Oracle](https://knowledge.bigenius-x.com/generators?hsLang=en#oracle)
    - [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 Azuze DevOps pipeline](https://knowledge.bigenius-x.com/generators?hsLang=en#deployment-with-an-azuze-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)
- [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