Skip to content

Fix skip command to use three-part table name for HMS ALTER#4829

Open
helloahau wants to merge 1 commit into
databrickslabs:mainfrom
helloahau:fix/skip-alter-three-part-table-name
Open

Fix skip command to use three-part table name for HMS ALTER#4829
helloahau wants to merge 1 commit into
databrickslabs:mainfrom
helloahau:fix/skip-alter-three-part-table-name

Conversation

@helloahau
Copy link
Copy Markdown

Problem

databricks labs ucx skip --schema ... --table ... emitted ALTER TABLE \schema`.`table`without thehive_metastorecatalog qualifier. On Unity Catalog-enabled SQL warehouses whose default catalog is nothive_metastore, this fails with [TABLE_OR_VIEW_NOT_FOUND] even when the row exists in UCX inventory (hive_metastore..tables`).

unskip_table_or_view already used table.full_name (three-part name); skip_table_or_view was inconsistent.

Change

  • Use escape_sql_identifier(table.full_name) in skip_table_or_view when applying the skip TBLPROPERTY, matching unskip_table_or_view.

Tests

  • Updated test_skip_happy_path expected SQL and corrected the view fixture name=view`` so it matches the skipped object.
python -m pytest tests/unit/hive_metastore/test_mapping.py::test_skip_happy_path -q

Made with Cursor

skip_table_or_view used schema.table, which breaks on Unity Catalog-enabled
SQL warehouses when the workspace default catalog is not hive_metastore.
unskip_table_or_view already used table.full_name (catalog.schema.table).

Use escape_sql_identifier(table.full_name) for SET TBLPROPERTIES, matching unskip.

Fixes TABLE_OR_VIEW_NOT_FOUND when running: databricks labs ucx skip

Co-authored-by: Cursor <cursoragent@cursor.com>
@helloahau helloahau requested a review from a team as a code owner May 14, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants