Skip to main content

Model properties

Models properties can be declared in .yml files in your models/ directory (as defined by the model-paths config).

You can name these files whatever_you_want.yml, and nest them arbitrarily deeply in subfolders within the models/ directory.

models/<filename>.yml
version: 2

models:
- name: <model name>
description: <markdown_string>
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")
latest_version: <version_identifier>
deprecation_date: <YAML_DateTime>
access: private | protected | public
config:
<model_config>: <config_value>
constraints:
- <constraint>
tests:
- <test>
- ... # declare additional data tests
columns:
- name: <column_name> # required
description: <markdown_string>
meta: {<dictionary>}
quote: true | false
constraints:
- <constraint>
tests:
- <test>
- ... # declare additional data tests
tags: [<string>]

# only required in conjunction with time_spine key
granularity: <any supported time granularity>

- name: ... # declare properties of additional columns

time_spine:
standard_granularity_column: <column_name>

versions:
- v: <version_identifier> # required
defined_in: <definition_file_name>
description: <markdown_string>
docs:
show: true | false
access: private | protected | public
constraints:
- <constraint>
config:
<model_config>: <config_value>
tests:
- <test>
- ... # declare additional data tests
columns:
# include/exclude columns from the top-level model properties
- include: <include_value>
exclude: <exclude_list>
# specify additional columns
- name: <column_name> # required
quote: true | false
constraints:
- <constraint>
tests:
- <test>
- ... # declare additional data tests
tags: [<string>]
- v: ... # declare additional versions

0