Skip to content

install fails on hyphenated catalog names: grant_permissions.py builds unquoted SQL identifiers #266

Description

@paulelbacha

Bug

scripts/grant_permissions.py interpolates the target catalog/schema into SQL without backtick-quoting, in four places (_ensure_schema, _ensure_volume, _ensure_tables DDL templating, and the CDF ALTER TABLE). Any catalog whose name contains a hyphen (common for shared demo catalogs, e.g. my-team-demos) breaks the install:

CREATE SCHEMA IF NOT EXISTS my-team-demos.genie_space_optimizer ...
=> [PARSE_SYNTAX_ERROR / INVALID_IDENTIFIER]

The whole install.sh run then fails at the grants step before the bundle deploy.

Repro

  1. Create (or pick) a UC catalog with a hyphen in its name.
  2. Run ./scripts/install.sh, select that catalog.
  3. The grant-permissions step fails with an identifier parse error on CREATE SCHEMA.

Fix

Backtick-quote the catalog and schema wherever they are interpolated into SQL statements (`my-team-demos`.`genie_space_optimizer`). PR incoming.

Tested

Patched locally and re-ran the full install against a hyphenated catalog: schema, volume, all GSO tables (incl. the CDF ALTERs) created cleanly; deploy completed and the app runs.

Note: the same unquoted-identifier pattern may also exist inside the GSO optimization job notebooks (the GSO_CATALOG consumer side) — I have only verified and patched the install path.

(Context: I'm a Databricks FE — hit this deploying the workbench into a UKI field workspace.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions