メインコンテンツまでスキップ

DELTA_METADATA_MISMATCH error condition

SQLSTATE: 42KDG

A metadata mismatch was detected when writing to the Delta table.

ACL_ENABLED

Table ACLs are enabled in this cluster, so automatic schema migration is not allowed. Please use the ALTER TABLE command for changing the schema.

ENABLE_LIQUID

To enable clustering on the existing table, please use "overwrite" mode and set: '.option("overwriteSchema", "true")'.

OVERWRITE_REQUIRED

To overwrite your schema or change partitioning, please set: '.option("overwriteSchema", "true")'.

Note that the schema can't be overwritten when using 'replaceWhere'.

PARTITIONING_MISMATCH

Partition columns do not match the partition columns of the table.

Given: <provided>

Table: <original>

SCHEMA_MISMATCH

A schema mismatch detected when writing to the Delta table (Table ID: <id>).

To enable schema migration using DataFrameWriter or DataStreamWriter, please set: '.option("mergeSchema", "true")'.

For other operations, set the session configuration spark.databricks.delta.schema.autoMerge.enabled to "true". See the documentation specific to the operation for details.

Table schema:

<tableSchema>

Data schema:

<dataSchema>