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 Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now