columns
- Models
- Sources
- Seeds
- Snapshots
- Analyses
models/<filename>.yml
version: 2
models:
- name: <model_name>
columns:
- name: <column_name>
data_type: <string>
description: <markdown_string>
quote: true | false
tests: ...
tags: ...
meta: ...
- name: <another_column>
...
models/<filename>.yml
version: 2
sources:
- name: <source_name>
tables:
- name: <table_name>
columns:
- name: <column_name>
description: <markdown_string>
data_type: <string>
quote: true | false
tests: ...
tags: ...
meta: ...
- name: <another_column>
...
seeds/<filename>.yml
version: 2
seeds:
- name: <seed_name>
columns:
- name: <column_name>
description: <markdown_string>
data_type: <string>
quote: true | false
tests: ...
tags: ...
meta: ...
- name: <another_column>
...
snapshots/<filename>.yml
version: 2
snapshots:
- name: <snapshot_name>
columns:
- name: <column_name>
description: <markdown_string>
data_type: <string>
quote: true | false
tests: ...
tags: ...
meta: ...
- name: <another_column>
analyses/<filename>.yml
version: 2
analyses:
- name: <analysis_name>
columns:
- name: <column_name>
description: <markdown_string>
data_type: <string>
- name: <another_column>
Columns are not resources in and of themselves. Instead, they are child properties of another resource type. They can define sub-properties that are similar to properties defined at the resource level:
tags
meta
tests
description
Because columns are not resources, their tags
and meta
properties are not true configurations. They do not inherit the tags
or meta
values of their parent resources. However, you can select a generic test, defined on a column, using tags applied to its column or top-level resource; see test selection examples.
Columns may optionally define a data_type
, which is necessary for:
- Enforcing a model contract
- Use in other packages or plugins, such as the
external
property of sources anddbt-external-tables
0