diff --git a/labs.yml b/labs.yml index 33f40b6c54..99e9bd069c 100644 --- a/labs.yml +++ b/labs.yml @@ -237,9 +237,6 @@ commands: - name: run-as-collection description: Run the command for the collection of workspaces with ucx installed. Default is False. - - name: create-ucx-catalog - description: Create UCX catalog for tracking the migration progress (possibly) across multiple workspaces. - - name: cluster-remap description: Re-mapping the cluster to UC @@ -273,6 +270,9 @@ commands: - name: default-catalog description: (Optional) Default catalog to assign to the workspace. If not provided, it will be hive_metastore + - name: create-ucx-catalog + description: Create UCX catalog for tracking the migration progress (possibly) across multiple workspaces. + - name: migrate-tables description: | Trigger the `migrate-tables` workflow and, optionally, `migrate-external-hiveserde-tables-in-place-experimental` diff --git a/src/databricks/labs/ucx/cli.py b/src/databricks/labs/ucx/cli.py index 13312c8388..6c0e9ba27c 100644 --- a/src/databricks/labs/ucx/cli.py +++ b/src/databricks/labs/ucx/cli.py @@ -514,13 +514,6 @@ def create_catalogs_schemas( workspace_context.catalog_schema.create_all_catalogs_schemas(prompts) -@ucx.command -def create_ucx_catalog(w: WorkspaceClient, prompts: Prompts, ctx: WorkspaceContext | None = None) -> None: - """Create UCX catalog for tracking the migration progress (possibly) across multiple workspaces.""" - workspace_context = ctx or WorkspaceContext(w) - workspace_context.catalog_schema.create_ucx_catalog(prompts) - - @ucx.command def cluster_remap(w: WorkspaceClient, prompts: Prompts): """Re-mapping the cluster to UC""" @@ -591,6 +584,13 @@ def assign_metastore( ctx.account_metastores.assign_metastore(ctx.prompts, workspace_id, metastore_id, default_catalog) +@ucx.command +def create_ucx_catalog(w: WorkspaceClient, prompts: Prompts, ctx: WorkspaceContext | None = None) -> None: + """Create UCX catalog for tracking the migration progress (possibly) across multiple workspaces.""" + workspace_context = ctx or WorkspaceContext(w) + workspace_context.catalog_schema.create_ucx_catalog(prompts) + + @ucx.command def migrate_tables( w: WorkspaceClient,