Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HMS Federation Documentation #3688

Merged
merged 2 commits into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion docs/ucx/docs/process/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ On a high level, the steps in migration process are:
1. [assessment](/docs/reference/workflows#assessment-workflow)
2. [group migration](/docs/reference/workflows#group-migration-workflow)
3. [table migration](/docs/process/#table-migration-process)
4. [data reconciliation](/docs/reference/workflows#post-migration-data-reconciliation-workflow)
4. [HMS Federation](/docs/process/#hms-federation)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FastLee : This is not a next step after table migration it is an alternative to table migration, could you make that clear?

5. [data reconciliation](/docs/reference/workflows#post-migration-data-reconciliation-workflow)
6. [code migration](/docs/reference/commands#code-migration-commands)
7. [delta live table pipeline migration](/docs/process#delta-live-table-pipeline-migration-process)
8. [final details](#final-details)
Expand Down Expand Up @@ -290,6 +291,26 @@ The [`revert-migrated-tables` command](/docs/reference/commands#revert-migrated-
the `upgraded_to` property on the source object. Use this command to allow for migrating a table or view again.


## HMS Federation

Hive Metastore (HMS) Federation is a feature that allows HMS to be federated to a catalog.
More information is available in the [Databricks documentation](https://docs.databricks.com/en/data-governance/unity-catalog/hms-federation/index.html).
HMS Federation is used in two scenarios:
1. A step to ease the migration to Unity Catalog.
2. A Hybrid solution where both HMS and UC access to the data is required.

> You are required to complete the [assessment workflow](/docs/reference/workflows#assessment-workflow) before starting the table migration workflow.
HMS Federation is an alternative to table migration.
You are required to complete all the steps documented in the [table migration process](/docs/process#table-migration-process) except for:
- [Table Mapping](/docs/process#table-mapping)
- [Create Catalogs and Schemas](/docs/process/#step-2-create-catalogs-and-schemas)
- [Migrate Hive metastore data objects](/docs/process#migrate-hive-metastore-data-objects)

There are two steps to enable HMS Federation:
1. [enable-hms-federation](/docs/reference/commands#enable-hms-federation)
2. [create-federated-catalog](/docs/reference/commands#create-federated-catalog)


## Code Migration

After you're done with the [table migration](#table-migration-process) and
Expand Down
45 changes: 44 additions & 1 deletion docs/ucx/docs/reference/commands/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -667,10 +667,53 @@ These commands are for [pipeline migration](/docs/process#delta-live-table-pipel

### `migrate-dlt-pipelines`

```text
```commandline
$ databricks labs ucx migrate-dlt-pipelines [--include-pipeline-ids <comma separated list of pipeline ids>] [--exclude-pipeline-ids <comma separated list of pipeline ids>]
```

## HMS (Hive Metastore) federation commands

These commands are for [Hive Metastore federation](/docs/process#hive-metastore-federation-process) and require the [assessment workflow](/docs/reference/workflows#assessment-workflow) to be completed.
Hive Metastore federation creates a UC catalog that mirrors all the schemas and tables in the source Hive Metastore. It is an alternative to the [table migration process](/docs/process#table-migration-process).

### `enable_hms_federation`

```commandline
$ databricks labs ucx enable_hms_federation
```

This command sets the `enable_hms_federation` flag in the config.yml file to `True`.<br/>
It is used to enable the Hive Metastore federation process.
It is also used by the `migrate-locations` command to determine whether to set the [Fallback Mode](https://docs.databricks.com/en/data-governance/unity-catalog/hms-federation/hms-federation-internal.html) to "True" in the newly created external locations.
In AWS it also also allows the creation a GLUE role if one is required using the `create-missing-principals` command.

### `create_federated_catalog`

```commandline
$ databricks labs ucx create_federated_catalog
```

This command performs the following steps:
1. Prompts the user for a name for the federated catalog and connection.
2. Create an HMS "Connection" in the Unity Catalog. The HMS connection will point to the HMS used by the workspace that was identified in the installation process. It supports:
- Internal Workspace Hive Metastore
- AWS Glue Data Catalog
- External Database Hive Metastore (Postgres, SQL Server, MySQL)
3. Create a federated catalog in Unity Catalog. The federated catalog will mirror all the schemas and tables in the source Hive Metastore.
4. Whitelist the external location identified in the "Assessment" phase.

### `migrate-glue-credentials`

```commandline
$ databricks labs ucx migrate-glue-credentials
```

AWS Only.
This command is used for HMS Federation and creates a UC Service Credential for GLUE. It requires an existing UC compatible GLUE role.
The role can be created using the `create-missing-principals` command.



## Utility commands

### `logs`
Expand Down