Using the + prefix
Use the + prefix to help clarify the difference between resource paths and configs in dbt_project.yml files.
The + prefix is a dbt syntax feature which helps disambiguate between resource paths and configs in dbt_project.yml files.
- It is not compatible with 
dbt_project.ymlfiles that useconfig-version1. - It doesn't apply to:
config()Jinja macro within a resource file- config property in a 
.ymlfile. 
 
For example:
name: jaffle_shop
config-version: 2
...
models:
  +materialized: view
  jaffle_shop:
    marts:
      +materialized: table
Throughout this documentation, we've tried to be consistent in using the + prefix in dbt_project.yml files.
However, the leading + is in fact only required when you need to disambiguate between resource paths and configs. For example, when:
- A config accepts a dictionary as its inputs. As an example, the 
persist_docsconfig. - Or, a config shares a key with part of a resource path. For example, if you had a directory of models named 
tags. 
dbt has deprecated specifying configurations without the + prefix in dbt_project.yml. Only folder and file names can be specified without the + prefix within resource configurations in dbt_project.yml.
name: jaffle_shop
config-version: 2
...
models:
  +persist_docs: # this config is a dictionary, so needs a + prefix
    relation: true
    columns: true
  jaffle_shop:
    schema: my_schema # a plus prefix is optional here
    +tags: # this is the tag config
      - "hello"
    config:
      tags: # whereas this is the tag resource path
        # changed to config in v1.10
        # The below config applies to models in the
        # models/tags/ directory.
        # Note: you don't _need_ a leading + here,
        # but it wouldn't hurt.
        materialized: view
Note: The use of the + prefix in dbt_project.yml is distinct from the use of + to control config merge behavior (clobber vs. add) in other config settings (specific resource .yml and .sql files). Currently, the only config which supports + for controlling config merge behavior is grants.
Was this page helpful?
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.