Skip to content

dft validate

Validate face YAML files for errors and warnings. The full validation path: parses every face, resolves variables and refs, checks query and chart shape against the schema, and reports problems in a single pass.

dft validate [OPTIONS] [PATH]

For a faster check that skips warehouse references, use dft check. For a deeper, descriptive walkthrough of one face, use dft explain.

Arguments

Argument Description
PATH Path to face file or directory. Default: faces/.

Options

Flag Description
--project-dir PATH dbt project directory. Default: current directory.
--strict / --no-strict Fail on warnings. Exit 1 if any warnings. Default: off.

Examples

# Validate every face in the default directory
dft validate

# Validate a single face
dft validate faces/sales.yml

# Validate a folder
dft validate faces/

# Treat warnings as errors (CI-friendly)
dft validate --strict

# Run from outside the project directory
dft validate --project-dir /path/to/dbt/project

Exit codes

Code Meaning
0 No errors (and no warnings if --strict)
1 Errors found, or warnings with --strict

Example output

faces/sales.yml:
  Error: Unknown metric 'total_sales' in query 'q_revenue'
  Error: Missing required field 'type' in chart 'revenue_chart'

faces/customers.yml:
  Warning: Chart 'customer_table' has no title

When to use

  • Pre-commit hooks — catch schema errors before commit
  • CI/CD pipelines — gate deployment on validation
  • Development — quick check after editing a face