Medium severitysql
Power BI Refresh Error:
DELTA_UNRESOLVABLE_DATE_PARTITION
What does this error mean?
Delta Lake cannot resolve a date-based partition value. The partition column contains a date string that does not match the expected format or falls outside the valid date range.
Common causes
- 1The source data contains a date string in an unexpected format (e.g., `DD/MM/YYYY` instead of `YYYY-MM-DD`)
- 2A null or empty value was written to a date partition column
- 3A date value is outside the valid Spark/Delta range (before year 0001 or after year 9999)
- 4The partition column type is DATE but the source data is a STRING with non-date content
How to fix it
- 1Cast the partition column to DATE explicitly before writing: `CAST(date_col AS DATE)` to enforce format validation.
- 2Filter out null or invalid date values upstream: `WHERE date_col IS NOT NULL AND date_col REGEXP '\d{4}-\d{2}-\d{2}'`.
- 3If the source date format differs from ISO 8601, use `to_date(date_col, 'DD/MM/YYYY')` to parse it correctly.
- 4Check the source data for sentinel values like `9999-12-31` or `0000-01-01` that may be outside the valid Delta range.