Skip to main content

dbt Cloud environments

An environment determines how dbt Cloud will execute your project in both the dbt Cloud IDE and scheduled jobs. Critically, in order to execute dbt, environments define three variables:

  1. The version of dbt Core that will be used to run your project
  2. The warehouse connection information (including the target database/schema settings)
  3. The version of your code to execute

For users familiar with development on the CLI, each environment is roughly analogous to an entry in your profiles.yml file, with some additional information about your repository to ensure the proper version of code is executed. More info on dbt core environments here.

Types of environments

In dbt Cloud, there are two types of environments: deployment and development. Deployment environments determine the settings used when jobs created within that environment are executed. Development environments determine the settings used in the dbt Cloud IDE for that particular dbt Cloud Project. Each dbt Cloud project can only have a single development environment but can have any number of deployment environments.

Development EnvironmentsDeployment Environments
Determines settings fordbt Cloud IDEdbt Cloud Job runs
How many can I have in my project?1Any number

Common environment settings

Both development and deployment environments have a section called General Settings, which has some basic settings that all environments will define:

SettingExample ValueDefinitionAccepted Values
NameProductionThe environment nameAny string!
Environment TypeDeploymentThe type of environment[Deployment, Development]
dbt Version1.4 (latest)The dbt version usedAny dbt version in the dropdown
Default to Custom Branch☑️Determines whether to use a branch other than the repository’s defaultSee below
Custom BranchdevCustom Branch nameSee below

dbt Version notes

  • dbt Cloud allows users to select any dbt release. At this time, environments must use a dbt version greater than or equal to v1.0.0; lower versions are no longer supported.
  • If you select a current version with (latest) in the name, your environment will automatically install the latest stable version of the minor version selected.

Custom branch behavior

By default, all environments will use the default branch in your repository (usually the main branch) when accessing your dbt code. This is overridable within each dbt Cloud Environment using the Default to a custom branch option. This setting have will have slightly different behavior depending on the environment type:

  • Development: determines which branch in the dbt Cloud IDE developers create branches from and open PRs against
  • Deployment: determines the branch is cloned during job executions for each environment.

For more info, check out this FAQ page on this topic!

Create a development environment

To create a new dbt Cloud development environment, navigate to Deploy -> Environments and then click Create Environment. Select Development as the environment type.

After setting the General Settings as above, there’s nothing more that needs to be done on the environments page. Click Save to create the environment.

Set developer credentials

To use the IDE, each developer will need to set up personal development credentials to your warehouse connection in their Profile Settings. This allows users to set separate target information, as well as maintain individual credentials to connect to your warehouse via the dbt Cloud IDE.

Creating a development environmentCreating a development environment

Create a deployment environment

To create a new dbt Cloud development environment, navigate to Deploy -> Environments and then click Create Environment. Select Deployment as the environment type.

Semantic Layer

For Semantic Layer-eligible customers, the next section of environment settings is the Semantic Layer configurations. The Semantic Layer setup guide has the most up-to-date setup instructions!

Deployment connection

Warehouse Connections

Warehouse connections are set at the Project level for dbt Cloud accounts, and each Project can have one connection (Snowflake account, Redshift host, Bigquery project, Databricks host, etc.). Some details of that connection (databases/schemas/etc.) can be overridden within this section of the dbt Cloud environment settings.

This section determines the exact location in your warehouse dbt should target when building warehouse objects! This section will look a bit different depending on your warehouse provider.

This section will not appear if you are using Postgres, as all values are inferred from the project's connection.

Deployment credentials

This section allows you to determine the credentials that should be used when connecting to your warehouse. The authentication methods may differ depending on the warehouse and dbt Cloud tier you are on.

Postgres Deployment Credentials SettingsPostgres Deployment Credentials Settings

Editable fields

  • Username: Postgres username to use (most likely a service account)
  • Password: Postgres password for the listed user
  • Schema: Target schema
0