MetricSign
EN|NLRequest Access
High severitycompilation

Power BI Refresh Error:
StateComparisonError

What does this error mean?

A dbt Slim CI run using state:modified or state:modified+ failed because the manifest comparison process encountered an error — such as a version mismatch, corrupted artifact, or schema change to a contracted node — that prevented reliable change detection.

Common causes

  • 1The production manifest.json was generated by a different dbt version than the CI environment, causing the schema URL to differ and making state comparison unreliable
  • 2A model that previously had a contract was removed or significantly restructured, and the state comparison logic raised an error on the incompatible diff
  • 3The production manifest was generated mid-run and is in a partially written state, causing JSON parse errors during comparison

How to fix it

  1. 1Step 1: Compare the dbt version used to generate the production manifest with the dbt version in your CI environment — they should match or be at a compatible minor version.
  2. 2Step 2: Validate the production manifest is complete: python3 -c "import json; json.load(open('manifest.json'))" — a parse error confirms a corrupted artifact.
  3. 3Step 3: If the comparison consistently fails after a dbt version upgrade, regenerate the production manifest by running a full dbt compile or dbt build in the production environment with the new version.
  4. 4Step 4: As a fallback, run without --select state:modified to execute all models until the manifest version mismatch is resolved.

Frequently asked questions

Can I suppress state comparison errors and fall back to a full run?

Not natively in dbt — you must handle this in your CI orchestration script by catching the exit code and re-running without --select state:modified as a fallback.

How often should the production manifest be refreshed?

Best practice is to generate a fresh production manifest on every successful production dbt run and upload it to artifact storage, so CI always compares against the current production state.

Other compilation errors