Configuration
refter
uses a lot of the default dbt configs and properties to generate your documentation.
Each section below lists both the dbt properties and refter
specific properties that are used by refter
to generate your documentation.
Model config properties
dbt model properties
The below dbt model properties are used by refter
:
- name
- description
- tags
- configs
- config meta - owner # used to communicate ownership of a model or table
- access
- version
refter
model properties
You can configure the following properties on a model. All properties are optional and are configured under config.refter
:
Property | Type | Description | Default |
---|---|---|---|
disabled | boolean | Don't show this model in your refter documentation | false |
deprecated.enabled | boolean | Show this model as deprecated in your refter documentation | false |
deprecated.reason | string | The reason why this model is deprecated | null |
deprecated.date | string | The date when this model was deprecated | null |
group | string | Group this model with other models in your refter documentation | null |
owner | string | Assign an owner to this model in your refter documentation | null |
Example
version: 2
models:
- name: customers
description: Table containing all customers
docs:
show: false # same result as setting `refter.disabled: true`
config:
tags:
- pii
meta:
owner: data-team
refter: # refter model properties
disabled: false
deprecated:
enabled: false
group: customers
owner: data-team
Column config properties
dbt column properties
- name
- description
- data type
- tests
refter
column properties
You can configure the following refter specific properties on a column. All properties are optional and are configured under by adding a refter
section for your column:
Property | Type | Description | Default |
---|---|---|---|
deprecated | boolean | (lifecycle mgmt) Flag this column as deprecated in your refter documentation | false |
relations | object | Configure relations between models | [] |
Relation config properties
You can configure the following properties on a relation, a column can have multiple relations:
Property | Type | Description | Default |
---|---|---|---|
model | string | The name of the model this column is related to | null |
column | string | The name of the column this column is related to | null |
type | string | The type of relation between the two columns | null |
Allowed relation types
one-to-one
one-to-many
many-to-one
many-to-many
Example
version: 2
models:
- name: orders
columns:
- name: order_id
data_type: int # refter uses dbt data types
tests:
- unique
- not_null
- name: old_order_id
data_type: int
refter: # refter column properties
deprecated:
enabled: true
reason: "This column is deprecated, use `order_id` instead"
date: "2021-01-01"
- name: customer_id
data_type: string
refter:
relations: # define ERD relations
- model: customers
column: customer_id
type: many-to-one
- name: status
description: The status of the order
Referencing models
Single project deployment
If you are deploying a single dbt project to Refter you can reference models by their name. dbt
requires all models to have a unique name on a per project basis.
Multi project deployment
If you are deploying multiple dbt projects to the same Refter project you can reference models by their database object name. A fully qualified database object name consists of the schema or database name and the table name separated by a dot. For example: schema_name.table_name
or database_name.table_name
.