MetricSign
EN|NLRequest Access
High severitydbt

Power BI Refresh Error:
Compilation Error: Incorrect YAML spec

What does this error mean?

A dbt schema YAML file has valid YAML syntax but does not conform to the dbt schema specification. Keys are unknown, misplaced, or required fields are missing.

Common causes

  • 1Using dbt v1.5+ schema syntax on an older dbt version (or vice versa)
  • 2Tests or columns placed at the wrong nesting level in schema.yml
  • 3Unknown keys that are not part of the dbt schema specification

How to fix it

  1. 1Review the dbt documentation for the correct schema.yml structure for your dbt version.
  2. 2Check if you are mixing dbt v1.5+ syntax (models: key at top level) with older syntax.
  3. 3Look for properties placed under the wrong parent key.
  4. 4Run `dbt parse` to see which file and key is invalid.

Frequently asked questions

What is the difference between an invalid YAML file and an incorrect YAML spec in dbt?

Invalid YAML means the file cannot be parsed (syntax error). Incorrect YAML spec means the file parses but uses unrecognized keys — e.g., an outdated key or a misspelled property like 'column' instead of 'columns'.

Does upgrading dbt change the YAML spec?

Yes — dbt versions sometimes add or deprecate YAML properties. After a major version upgrade, check the dbt migration guide for breaking changes to schema.yml structure. Running dbt parse after an upgrade surfaces spec errors before running a full job.

How do I find which file has the incorrect spec?

The dbt error message includes the file path and the specific key that is unrecognized or invalid. Start by running dbt parse or dbt compile to surface all spec errors before running a full job.

Official documentation: https://docs.getdbt.com/guides/debug-errors

Other dbt errors