Some projects run the same models for several regions, each on its own schedule: Europe early in the
morning, the Americas a few hours later. In dbt Cloud you create one job per region and give each a
different value, either with --vars in the command or with a job-level environment variable. The part
to get right is where each region’s results are written.
Copy and paste
Option 1: –vars in each job’s command
dbt build --select tag:regional --vars '{region: eu}'
-- models/marts/regional_sales.sql
{{ config(schema='sales_' ~ var('region')) }}
select order_date, sum(amount) as revenue
from {{ ref('stg_orders') }}
where region = '{{ var("region") | upper }}'
group by order_date
Create a second job with --vars '{region: us}', a third with apac, and give each its own schedule.
Option 2: a job-level environment variable
In the environment settings, add DBT_REGION with a default value. In each job, open Advanced
settings > Environment variables and override it: eu in one job, us in the other. The model
reads it with env_var():
{{ config(schema='sales_' ~ env_var('DBT_REGION', 'eu')) }}
select order_date, sum(amount) as revenue
from {{ ref('stg_orders') }}
where region = '{{ env_var("DBT_REGION", "eu") | upper }}'
group by order_date
Keep the regions apart
If the EU job and the US job both build regional_sales in the same table, each run replaces the other
region’s data. The schema config above sends each region to its own schema, sales_eu and sales_us,
which go through generate_schema_name like any custom schema; see
how to change the target schema.
Two other ways work as well:
- One table, one region at a time: an incremental model with
unique_key='region'andincremental_strategy='delete+insert'replaces only the rows of the region being built. - One table name per region:
{{ config(alias='regional_sales_' ~ var('region')) }}.
–vars or environment variables
--vars in the command |
Job-level environment variable | |
|---|---|---|
| Where the value lives | in the job’s command | in the job’s advanced settings |
| Read with | var('region') |
env_var('DBT_REGION') |
| Default | in var() or dbt_project.yml |
at project or environment level |
| Visible in the run log | yes, in the command | no, only in the job settings |
Environment variables in dbt Cloud must start with DBT_. A job-level value overrides the environment
value, which overrides the project default, which overrides the default in env_var().
One job, several regions
When the regions do not need different schedules, a single job can list one command per region:
dbt build --select tag:regional --vars '{region: eu}'
dbt build --select tag:regional --vars '{region: us}'
The commands run one after the other, and a failure in the first stops the second. To start a region on demand, pass the command through the API instead; see how to trigger a dbt Cloud job from the API.
The dbt code was tested with dbt Core 1.12; the job settings come from the dbt platform documentation (October 2026).