Snapshot properties
In Versionless and dbt v1.9 and later, snapshots are defined and configured in YAML files within your snapshots/
directory (as defined by the snapshot-paths
config). Snapshot properties are declared within these YAML files, allowing you to define both the snapshot configurations and properties in one place.
We recommend that you put them in the snapshots/
directory. You can name these files whatever_you_want.yml
, and nest them arbitrarily deeply in subfolders within the snapshots/
or models/
directory.
snapshots/<filename>.yml
version: 2
snapshots:
- name: <snapshot name>
description: <markdown_string>
meta: {<dictionary>}
docs:
show: true | false
node_color: <color_id> # Use name (such as node_color: purple) or hex code with quotes (such as node_color: "#cd7f32")
config:
<snapshot_config>: <config_value>
tests:
- <test>
- ...
columns:
- name: <column name>
description: <markdown_string>
meta: {<dictionary>}
quote: true | false
tags: [<string>]
tests:
- <test>
- ... # declare additional tests
- ... # declare properties of additional columns
- name: ... # declare properties of additional snapshots
0