From 9a5ba5306792eb2a8a0068146c94639f4f3ae490 Mon Sep 17 00:00:00 2001 From: Amin Movahed Date: Mon, 5 Aug 2024 13:37:02 +1000 Subject: [PATCH] Incorporating the review comments --- src/databricks/labs/ucx/hive_metastore/workflows.py | 5 ----- .../main/04_1_remaining_tables.sql} | 0 tests/integration/hive_metastore/test_workflows.py | 2 +- 3 files changed, 1 insertion(+), 6 deletions(-) rename src/databricks/labs/ucx/queries/{assessment/main/40_4_remaining_tables.sql => migration/main/04_1_remaining_tables.sql} (100%) diff --git a/src/databricks/labs/ucx/hive_metastore/workflows.py b/src/databricks/labs/ucx/hive_metastore/workflows.py index ee19c2b19e..bb80f36d63 100644 --- a/src/databricks/labs/ucx/hive_metastore/workflows.py +++ b/src/databricks/labs/ucx/hive_metastore/workflows.py @@ -72,11 +72,6 @@ def migrate_views(self, ctx: RuntimeContext): def refresh_migration_status(self, ctx: RuntimeContext): """Refresh the migration status to present it in the dashboard.""" ctx.tables_migrator.index_full_refresh() - - @job_task(job_cluster="table_migration", depends_on=[migrate_external_tables_sync, migrate_dbfs_root_delta_tables, - migrate_dbfs_root_non_delta_tables, migrate_views, refresh_migration_status]) - def refresh_not_migrated_status(self, ctx: RuntimeContext): - """Refresh the not migrated tables status to present it in the dashboard.""" ctx.tables_migrator.get_remaining_tables( # workspace_name=ctx.workspace_info.current() ) diff --git a/src/databricks/labs/ucx/queries/assessment/main/40_4_remaining_tables.sql b/src/databricks/labs/ucx/queries/migration/main/04_1_remaining_tables.sql similarity index 100% rename from src/databricks/labs/ucx/queries/assessment/main/40_4_remaining_tables.sql rename to src/databricks/labs/ucx/queries/migration/main/04_1_remaining_tables.sql diff --git a/tests/integration/hive_metastore/test_workflows.py b/tests/integration/hive_metastore/test_workflows.py index a67f9fc677..7cfc53d72f 100644 --- a/tests/integration/hive_metastore/test_workflows.py +++ b/tests/integration/hive_metastore/test_workflows.py @@ -99,7 +99,7 @@ def test_hiveserde_table_ctas_migration_job(ws, installation_ctx, prepare_tables assert False, f"{table.name} not found in {dst_schema.catalog_name}.{dst_schema.name}" #TODO: add an integration test for refresh_not_migrated_status task in migrate-tables workflow -@pytest.mark.parametrize('prepare_tables_for_migration', [('regular')], indirect=True) +@pytest.mark.parametrize('prepare_tables_for_migration', ['regular'], indirect=True) def test_refresh_not_migrated_status_job(ws, installation_ctx, prepare_tables_for_migration): tables, dst_schema = prepare_tables_for_migration ctx = installation_ctx.replace(