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: 

import of tables to a new metastore failed with schema mismatch "specified schema does not match the existing schema"

nbakh
New Contributor II

The error i get when importing certain delta table is

The specified schema does not match the existing schema at dbfs:/mnt/mart/tablename

however, when i check the metadata table in the old workspace and the exported file, they match. However, it seems that whatever the metadata is in the external location above is different.

The main difference is that the for many of the columns in dbfs:/mnt the column type is string while the metadata from the metastore shows varchar255.

Can anyone advise why there would be a difference and a way to resolve it

1 REPLY 1

nbakh
New Contributor II

below is example error. however, in existing metadata i still see varchar 100 as the type.

Specified metadata for field Percentage is different from existing schema:\n Specified: {}\n Existing: {\"HIVE_TYPE_STRING\":\"varchar(100)\"}\n\nIf your intention is to keep the existing schema

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!