Skip to content

Model descriptions

Validate the model has a description

Source code in checkers/checks.py
def check_model_has_description(model: Model, params: Dict):
    """
    Validate the model has a description
    """

    assert model.description not in ("", None), "Missing model description"
    assert (
        len(model.description) >= params["minimum_description_length"]
    ), "Model description not long enough"
    assert (
        len(model.description.split()) >= params["minimum_description_words"]
    ), f"Model description is too few words"

Reason to flag#

Model descriptions are a key part of your project's documentation. They provide a high level summary of the purpose and contents of the model. We recommend that every model in your project has meaningful description.

Fixing#

Add a description to the model's config block, or update the model's yaml entry.

Example config block:

{{
  config(
    description="A model representing all the product's users."
  )
}}

Example yaml entry:

models:
  - name: user
    description: A model representing all the product's users

Parameters#

  • minimum_description_length: The minimum number of characters in the description
  • minimum_description_words: The minimum number of words in the description