Medium severitydata format
Power BI Refresh Error:
23514
What does this error mean?
A CHECK constraint rejected an INSERT or UPDATE because the value did not satisfy the defined condition.
Common causes
- 1Source data contains values outside the valid range defined by the constraint
- 2CHECK constraint added to an existing column without validating existing data
- 3Transformation logic introduced negative values in a column constrained to be positive
How to fix it
- 1Step 1: Identify the constraint: `SELECT conname, consrc FROM pg_constraint WHERE contype = 'c' AND conrelid = '<table>'::regclass;`
- 2Step 2: Add validation in the ETL pipeline to filter or clamp values to the allowed range.
- 3Step 3: Review whether the constraint is still appropriate and consider relaxing it if business logic has changed.
Frequently asked questions
Official documentation: https://www.postgresql.org/docs/current/errcodes-appendix.html