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:ย 

Difference in support for partitions between hive and Unity

m208205
New Contributor

The Unity migration guide (https://docs.databricks.com/en/data-governance/unity-catalog/migrate.html#before-you-begin) states the following:

Unity Catalog manages partitions differently than Hive. Hive commands that directly manipulate partitions are not supported on tables managed by Unity Catalog.

I'm unable to find documentation that elaborates on this statement.  What specifically is different in the handling of partitions between Unity and hive?  We have existing partitioned delta tables in our hive meta store that we are considering migrating to Unity.

1 REPLY 1

Kaniz_Fatma
Community Manager
Community Manager

Hi @m208205, The Unity Catalog and Hive handle partitions differently, and this distinction is important when migrating existing partitioned Delta tables from Hive to Unity Catalog.

Here are the key differences:

  1. Partition Management:

    • Unity Catalog: When using Unity Catalog, you wonโ€™t be able to directly manipulate partitions using Hive commands. Unity Catalog manages partitions in its own way.
    • Hive: In Hive, you can use commands like ALTER TABLE ... ADD PARTITION or ALTER TABLE ... DROP PARTITION to modify partitions directly.
  2. Table History Migration:

    • When you run CREATE TABLE CLONE to migrate tables from Hive to Unity Catalog, the table history is not migrated. Any tables cloned to Unity Catalog are treated as new tables.
  3. Managed Tables in Unity Catalog:

    • Itโ€™s recommended to create managed tables in Unity Catalog. Managed tables are the preferred way to create tables because they provide better control over metadata and lifecycle management.

For more detailed information, you can refer to the official documentation on upgrading Hive tables and views to Unity Catalog. This guide will help you navigate the migration process effectively. If you have any further questions, feel free to ask! ๐Ÿ˜Š

 
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!