Skip to content

Commit

Permalink
Move create-ucx-catalog close to assign-metastore
Browse files Browse the repository at this point in the history
  • Loading branch information
JCZuurmond committed Sep 24, 2024
1 parent 7a1bf02 commit 2679456
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions labs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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`
Expand Down
14 changes: 7 additions & 7 deletions src/databricks/labs/ucx/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,13 +527,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"""
Expand Down Expand Up @@ -604,6 +597,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,
Expand Down

0 comments on commit 2679456

Please sign in to comment.