cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

NOT NULL constraint violated for column during OPTIMIZE

Malthe
Valued Contributor II

We're running an optimize on a delta table with a VARIANT column that has a NOT NULL constraint.

Now, there are no NULL entries in this column. And yet, OPTIMIZE gives this error:

[DELTA_NOT_NULL_CONSTRAINT_VIOLATED] NOT NULL constraint violated for column: body.

What gives? There is in fact also no is_variant_null matches either. Could it be that the NOT NULL constraint is violated in some earlier transaction?

I am not able to drop the constraint because this is a streaming table.

0 REPLIES 0