cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.