# Migrating to Unity Catalog

When you enable Unity Catalog, Immuta automatically migrates your existing Databricks data sources in Immuta to reference the legacy `hive_metastore` catalog to account for Unity Catalog's [three-level hierarchy](https://documentation.immuta.com/saas/configuration/integrations/databricks/unity-catalog-overview#unity-catalog-object-model). New data sources will reference the Unity Catalog metastore you create and attach to your Databricks workspace.

Because the `hive_metastore` catalog is not managed by Unity Catalog, existing data sources in the `hive_metastore` cannot have Unity Catalog access controls applied to them. [Data sources in the Hive Metastore must be managed by the Databricks Spark integration](https://documentation.immuta.com/saas/configuration/integrations/databricks/databricks-spark).

To allow Immuta to administer Unity Catalog access controls on that data, move the data to Unity Catalog and re-register those tables in Immuta by completing the steps below. If you don't move all data before configuring the integration, [metastore magic](https://documentation.immuta.com/saas/configuration/integrations/databricks/..#metastore-magic) will protect your existing data sources throughout the migration process.

1. Ensure that all Databricks clusters that have Immuta installed are stopped and the Immuta configuration is removed from the cluster. Immuta-specific cluster configuration is no longer needed with the Databricks Unity Catalog integration.
2. Move all data into Unity Catalog before configuring Immuta with Unity Catalog. *Existing data sources will need to be re-created after they are moved to Unity Catalog and the Unity Catalog integration is configured.*
3. [Register a Unity Catalog connection](https://documentation.immuta.com/saas/configuration/integrations/databricks/databricks-unity-catalog/how-to-guides/connect-unity-catalog).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.immuta.com/saas/configuration/integrations/databricks/databricks-unity-catalog/how-to-guides/migrating.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
