Medium severityconfiguration
Power BI Refresh Error:
dbt store_failures Relation Error
What does this error mean?
A dbt test configured with `store_failures: true` failed to create or write to the failures relation (table or view). This prevents test failure rows from being persisted for investigation.
Common causes
- 1The dbt user lacks CREATE TABLE privilege in the `store_failures_schema` schema
- 2The `store_failures_schema` does not exist and the user lacks CREATE SCHEMA privilege
- 3Conflicting relation already exists with a different type (e.g. a view where a table is expected)
- 4store_failures enabled globally but the test target schema has been cleaned up between runs
- 5Using store_failures in a read-only environment (e.g. a PR CI check with restricted permissions)
How to fix it
- 1Grant CREATE on the store_failures schema: `GRANT CREATE TABLE ON SCHEMA dbt_test__audit TO <role>`
- 2Create the failures schema manually if it does not exist: `CREATE SCHEMA IF NOT EXISTS dbt_test__audit`
- 3Check for a conflicting relation: `DROP VIEW dbt_test__audit.<test_name>` if the previous run created a view
- 4Override the store_failures schema per environment: `+store_failures_schema: dbt_test__audit_{{ target.name }}`
- 5Disable store_failures in read-only CI environments using a target-conditional config in dbt_project.yml