meta
▶Changelog
- Models
- Sources
- Seeds
- Snapshots
- Tests
- Analyses
- Macros
models/schema.yml
version: 2models:- name: model_nameconfig:meta: {<dictionary>}columns:- name: column_namemeta: {<dictionary>}
The meta
config can also be defined:
- under the
models
config block indbt_project.yml
- in a
config()
Jinja macro within a model's SQL file
See configs and properties for details.
Definition
The meta
field can be used to set metadata for a resource. This metadata is compiled into the manifest.json
file generated by dbt, and is viewable in the auto-generated documentation.
Depending on the resource you're configuring, meta
may be available within the config
property, or as a top-level key. (For backwards compatibility, meta
is always supported as a top-level key, though without the capabilities of config inheritance.)
▶Changelog
Examples
Designate a model owner
Additionally, indicate the maturity of a model using a model_maturity:
key.
models/schema.yml
version: 2models:- name: usersmeta:owner: "@alice"model_maturity: in dev
Designate a source column as containing PII
models/schema.yml
version: 2sources:- name: salesforcetables:- name: accountmeta:contains_pii: truecolumns:- name: emailmeta:contains_pii: true
Configure one meta attribute for all seeds
dbt_project.yml
seeds:+meta:favorite_color: red
Override one meta attribute for a single model
models/my_model.yml
{{ config(meta = {'single_key': 'override'}) }}select 1 as id