How to Import an old Unity Catalog Metastore to a new Unity Catalog Metastore?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2023 08:28 AM
Hi All,
I have created a new Unity Catalog (UC) metastore (new metastore ID) in west europe and now i want to import alle catalog/schema/tables form the old metastore (west europe) container to the new UC metastore.
Note: coping all tables form the old metastore container to the new metastore container didn't works.
- Labels:
-
ContainerStorage
-
Metastore
-
UC
-
Unity Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2023 08:05 PM
@Ron Barneveld :
To import all the catalog/schema/tables from the old Unity Catalog (UC) metastore to the new one, you can use the 'Export Metadata' and 'Import Metadata' functionalities provided by Databricks.
Here are the high-level steps to do this:
- Export metadata from the old metastore container to a file. You can do this using the databricks workspace export command in the Databricks CLI
databricks workspace export /FileStore/my-metadata-folder/metadata.json
- Copy the exported file to a location that is accessible from the new Databricks workspace
- Import metadata from the exported file to the new metastore container. You can do this using the databricks workspace import command in the Databricks CLI. This command will import all the objects defined in the metadata file, including notebooks, libraries, and other artifacts. If you only want to import the catalog/schema/tables, you can filter the metadata file to include only the relevant objects before importing it
databricks workspace import /FileStore/my-metadata-folder/metadata.json
- Verify that the catalog/schema/tables have been imported correctly by checking the Unity Catalog UI in the new Databricks workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2023 07:31 AM
Hi Suteja,
Thanks for your reply. You mention these: databricks workspace export /FileStore/my-metadata-folder/metadata.json but the statement should be like this: databricks workspace export [OPTIONS] SOURCE_PATH TARGET_PATH , right? There must be a SOURCE_PATH of the UC metastore, so where can i find the metadata of the UC metastore that i can export. It doesn't exist in the Databricks workspace filefolder.
By the way i still have my old UC metastore in the ASDL.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2023 09:55 PM
Hi @Ron Barneveld
Hope everything is going great.
Just wanted to check in if you were able to resolve your issue. If yes, would you be happy to mark an answer as best so that other members can find the solution more quickly? If not, please tell us so we can help you.
Cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2023 05:53 AM
Hi Vidula,
I am afraid that our issue is still not resolve. We have created the default UC metastore on prod.
We understand that we wouldn't delete a metastore on daily bases but we still interesting if it's possible to export/import the metadata of an UC metastore.
Thanks any for your interest!
Ron (Barney)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2023 02:07 AM
Hi Barney,
Just wondering if you got this issue solved.
Thank you so much,
Adriana Cavalcanti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2023 10:58 AM
@Retired_mod @Barney Will this method work to import table and column metadata from one metasrore to another in unity catalg? I thought this only works when upgrading tables from legacy hive_metastore to a catalog in unity-catalog ?
I have a spreadheet containing table & column descriptions (comments) Is there a way to upload this against the schema in unity catalog? Basically instead of running 'Alter table <> alter column <> comment "description" ' these commands for every column, is there a way to mass apply column comments in unity catalog schema?

