Skip to content

[BUG]: Query failures when workspace default catalog is not hive_metastore #2207

@arothian

Description

@arothian

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

If the workspace where UCX is running has the default catalog set to something other than hive_metastore, multiple UCX cli commands will fail.

Expected Behavior

The queries executed by UCX should all be namespaced into hive_metastore without relying on the default catalog setting.

Steps To Reproduce

  1. Execute the assessment workflows
  2. Update the workspace default catalog to another UC catalog than hive_metastore
  3. Run databricks labs ucx create-catalogs-schemas - error occurs. Error message is not accurate. Using --debug to see the correct error
ERROR [d.l.ucx.create-catalogs-schemas] ValueError: cluster_id is required in the configuration. Config: host=https://<redacted>.cloud.databricks.com, token=***, auth_type=pat. Env: DATABRICKS_HOST, DATABRICKS_TOKEN
18:45:11 DEBUG [d.l.lsql.backends] [api][fetch] SELECT * FROM ucx.mounts
18:45:11 DEBUG [d.l.lsql.core] Executing SQL statement: SELECT * FROM ucx.mounts
18:45:12 DEBUG [databricks.sdk] POST /api/2.0/sql/statements/
> {
>   "format": "JSON_ARRAY",
>   "statement": "SELECT * FROM ucx.mounts",
>   "warehouse_id": "<redacted>"
> }
< 200 OK
< {
<   "statement_id": "<redacted>",
<   "status": {
<     "error": {
<       "error_code": "BAD_REQUEST",
<       "message": "[TABLE_OR_VIEW_NOT_FOUND] The table or view `ucx`.`mounts` cannot be found. Verify the spelling ... (292 more bytes)"
<     },
<     "state": "FAILED"
<   }
< }

Cloud

AWS

Operating System

macOS

Version

latest via Databricks CLI

Relevant log output

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions