Skip to content

Commit caa4a1c

Browse files
authored
HMS Federation Documentation (#3688)
Added documentation for HMS Fed
1 parent 1a5fbb8 commit caa4a1c

File tree

2 files changed

+66
-2
lines changed

2 files changed

+66
-2
lines changed

docs/ucx/docs/process/index.mdx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ On a high level, the steps in migration process are:
88
1. [assessment](/docs/reference/workflows#assessment-workflow)
99
2. [group migration](/docs/reference/workflows#group-migration-workflow)
1010
3. [table migration](/docs/process/#table-migration-process)
11-
4. [data reconciliation](/docs/reference/workflows#post-migration-data-reconciliation-workflow)
11+
4. [HMS Federation](/docs/process/#hms-federation)
12+
5. [data reconciliation](/docs/reference/workflows#post-migration-data-reconciliation-workflow)
1213
6. [code migration](/docs/reference/commands#code-migration-commands)
1314
7. [delta live table pipeline migration](/docs/process#delta-live-table-pipeline-migration-process)
1415
8. [final details](#final-details)
@@ -290,6 +291,26 @@ The [`revert-migrated-tables` command](/docs/reference/commands#revert-migrated-
290291
the `upgraded_to` property on the source object. Use this command to allow for migrating a table or view again.
291292

292293

294+
## HMS Federation
295+
296+
Hive Metastore (HMS) Federation is a feature that allows HMS to be federated to a catalog.
297+
More information is available in the [Databricks documentation](https://docs.databricks.com/en/data-governance/unity-catalog/hms-federation/index.html).
298+
HMS Federation is used in two scenarios:
299+
1. A step to ease the migration to Unity Catalog.
300+
2. A Hybrid solution where both HMS and UC access to the data is required.
301+
302+
> You are required to complete the [assessment workflow](/docs/reference/workflows#assessment-workflow) before starting the table migration workflow.
303+
HMS Federation is an alternative to table migration.
304+
You are required to complete all the steps documented in the [table migration process](/docs/process#table-migration-process) except for:
305+
- [Table Mapping](/docs/process#table-mapping)
306+
- [Create Catalogs and Schemas](/docs/process/#step-2-create-catalogs-and-schemas)
307+
- [Migrate Hive metastore data objects](/docs/process#migrate-hive-metastore-data-objects)
308+
309+
There are two steps to enable HMS Federation:
310+
1. [enable-hms-federation](/docs/reference/commands#enable-hms-federation)
311+
2. [create-federated-catalog](/docs/reference/commands#create-federated-catalog)
312+
313+
293314
## Code Migration
294315

295316
After you're done with the [table migration](#table-migration-process) and

docs/ucx/docs/reference/commands/index.mdx

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,10 +667,53 @@ These commands are for [pipeline migration](/docs/process#delta-live-table-pipel
667667

668668
### `migrate-dlt-pipelines`
669669

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

674+
## HMS (Hive Metastore) federation commands
675+
676+
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.
677+
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).
678+
679+
### `enable_hms_federation`
680+
681+
```commandline
682+
$ databricks labs ucx enable_hms_federation
683+
```
684+
685+
This command sets the `enable_hms_federation` flag in the config.yml file to `True`.<br/>
686+
It is used to enable the Hive Metastore federation process.
687+
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.
688+
In AWS it also also allows the creation a GLUE role if one is required using the `create-missing-principals` command.
689+
690+
### `create_federated_catalog`
691+
692+
```commandline
693+
$ databricks labs ucx create_federated_catalog
694+
```
695+
696+
This command performs the following steps:
697+
1. Prompts the user for a name for the federated catalog and connection.
698+
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:
699+
- Internal Workspace Hive Metastore
700+
- AWS Glue Data Catalog
701+
- External Database Hive Metastore (Postgres, SQL Server, MySQL)
702+
3. Create a federated catalog in Unity Catalog. The federated catalog will mirror all the schemas and tables in the source Hive Metastore.
703+
4. Whitelist the external location identified in the "Assessment" phase.
704+
705+
### `migrate-glue-credentials`
706+
707+
```commandline
708+
$ databricks labs ucx migrate-glue-credentials
709+
```
710+
711+
AWS Only.
712+
This command is used for HMS Federation and creates a UC Service Credential for GLUE. It requires an existing UC compatible GLUE role.
713+
The role can be created using the `create-missing-principals` command.
714+
715+
716+
674717
## Utility commands
675718

676719
### `logs`

0 commit comments

Comments
 (0)