Skip to content

check_source_table_descriptions

This check validates that a source has specified a description for all of its tables.

A dbt source is built from two components: the source name and the source table. For example, the source below has a name poffertjes_shop and defines two tables: order and customers.

sources:
  - name: poffertjes
    description: "Data about our poffertjes shop"
    tables:
      - name: orders
      - name: customers
        description: "The customers that bought a poffertjes"

You can see in the example above that the source table orders is not documented.

This check would flag the orders table as missing documentation.

Parameters

Name Default Type Description
minimum_description_length 5 int The minimum length of the source table's description

Info

For more information about how to set custom parameters for a check, see the documentation on configuration.

Source

def check(source: dict, minimum_description_length: int = 5):
    assert source["description"] is not None
    assert len(source["description"]) > minimum_description_length