Help Center> Cloud Data Migration> FAQs> Troubleshooting> Hudi Destination Case Library> What Should I Do If the Auto Creation of the Hudi Table Fails Due to a Schema Mismatch?
Updated on 2023-06-21 GMT+08:00

What Should I Do If the Auto Creation of the Hudi Table Fails Due to a Schema Mismatch?

Symptom

When CDM migrates data to Hudi and automatic table creation is enabled for Hudi, the schema mismatch error "org.apache.spark.sql.AnalysisException:Specified schema in create table statement is not equal to the table schema" is reported when the table creation statement is executed.

Possible Cause

A table is deleted from MetaStore, but the file is not cleared. The directory file of the table exists. A foreign table may be created.

Solution

Clear the table directory and run the job again.

Hudi Destination Case Library FAQs

more