has_description

Rule: has_description


has_description details
This rule ensures that every dbt object has a description provided in the configuration.

Configuration

  • type: Must be has_description.
  • min_length: (optional) Minimum number of characters (after trimming whitespace) the description must have. If not set, any non-empty description passes.
  • forbidden_substrings: (optional) A list of strings that the description must not contain. Useful for catching placeholder descriptions like "TODO" or "test_description".
  • applies_to: (optional) List of dbt object types to include.
    • Default: ["models", "seeds", "snapshots", "sources", "unit_tests", "macros", "exposures", "semantic_models"]
    • Options: models, seeds, snapshots, sources, unit_tests, macros, exposures, semantic_models
Common Rule Config
  • name: Human-readable name of the rule.
  • severity: "error" (fail) or "warning" (warn only).
    • (optional, defaults to "error" if not specified)
  • description: Human-readable explanation of the rule.
  • category: Override the default rule category. Included in structured output (JSON, CSV, NDJSON) but not in the CLI table. Each rule has a built-in default (e.g. documentation, naming, testing, governance, structure, performance).
    • (optional, defaults to the rule type's built-in category)
  • includes: List of patterns to explicitly include for this rule. See Includes & Excludes for pattern syntax and examples.
  • excludes: List of patterns to explicitly exclude from this rule. See Includes & Excludes for pattern syntax and examples.
  • model_materializations: Filter models by materialization type. Only applies when applies_to includes models.
    • (optional, if not specified all materializations are included)
    • Built-in types: table, view, incremental, ephemeral, materialized_view. Custom materializations are also supported.
    • Example: ["table", "incremental"]

Example Config

manifest_tests:
  - name: "everything_has_description"
    type: "has_description"
    description: "Everything must have a description."
    # severity: "warning"  (optional)
    # applies_to: ['models', 'seeds'] (optional)
    # includes: ["path/to/include/*"]
    # excludes: ["path/to/exclude/*"]

  - name: "meaningful_descriptions"
    type: "has_description"
    description: "Descriptions must be meaningful."
    min_length: 10
    forbidden_substrings: ["TODO", "test_description", "placeholder"]
    applies_to:
      - "models"
[[manifest_tests]]
name = "everything_has_description"
type = "has_description"
description = "Everything must have a description."
# severity = "warning"  # (optional)
# applies_to = ["models", "seeds"]  # (optional)
# includes = ["path/to/include/*"]
# excludes = ["path/to/exclude/*"]

[[manifest_tests]]
name = "meaningful_descriptions"
type = "has_description"
description = "Descriptions must be meaningful."
min_length = 10
forbidden_substrings = ["TODO", "test_description", "placeholder"]
applies_to = ["models"]
[[tool.dbtective.manifest_tests]]
name = "everything_has_description"
type = "has_description"
description = "Everything must have a description."
# severity = "warning"  # (optional)
# applies_to = ["models", "seeds"]  # (optional)
# includes = ["path/to/include/*"]
# excludes = ["path/to/exclude/*"]

[[tool.dbtective.manifest_tests]]
name = "meaningful_descriptions"
type = "has_description"
description = "Descriptions must be meaningful."
min_length = 10
forbidden_substrings = ["TODO", "test_description", "placeholder"]
applies_to = ["models"]
Relevant dbt code
models:
  - name: model_with_description
    description: This is a model with a description
  - name: model_without_description