---
title: DELTA_METADATA_MISMATCH error condition
description: Documentation for the DELTA\_METADATA\_MISMATCH error condition on Databricks
canonical_url: https://docs.databricks.com/aws/en/error-messages/delta-metadata-mismatch-error-class
---

# DELTA\_METADATA\_MISMATCH error condition

[SQLSTATE: 42KDG](https://docs.databricks.com/aws/en/error-messages/sqlstates.md#class-42-syntax-error-or-access-rule-violation)

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>`
