-
Notifications
You must be signed in to change notification settings - Fork 16.8k
Description
Bug description
Hi there,
Some of the users are hitting an issue on Superset v6 using the databricks python connector
The metadata discovery (table browser) is currently broken when using catalogs and/or schemas containing hyphens (which is very common in Databricks Unity Catalog). Superset fails to fetch the table list because the generated SQL is not properly quoted.
For example, it currently generates:
SHOW TABLES FROM my-staging-catalog.my-poc-schema
Instead of:
SHOW TABLES FROM `my-staging-catalog`.`my-poc-schema`
This triggers a [INVALID_IDENTIFIER] error because the hyphen is interpreted as a subtraction operator rather than part of the identifier.
[INVALID_IDENTIFIER] The unquoted identifier my-staging-catalog is invalid and must be back quoted as: `my-staging-catalog`.
Unquoted identifiers can only contain ASCII letters ('a' - 'z', 'A' - 'Z'), digits ('0' - '9'), and underbar ('_').
This was fixed in SQL Alchemy in v2.0.4 but the repo has pinned v1.0.5
Can we please update to point to the recent version of Databricks SQL Alchemy?
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
Not applicable
Browser
Chrome
Additional context
No response
Checklist
- I have searched Superset docs and Slack and didn't find a solution to my problem.
- I have searched the GitHub issue tracker and didn't find a similar bug report.
- I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.