Inconsistent behavior listing schemas in UC catalogs depending on quoting
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
Research direction
Start by reproducing the issue with the Python example and inspect the cursor.schemas API entry point. Compare the results for schemas('dev') and schemas('dev') against the catalog containing default and my_schema; done means both forms return the same schema rows, including global_temp.
Written by the indexing model from the issue text.
Description
With a dev catalog containing default and my_schema schemas, I get different results depending on the name quoting:
import os
from databricks import sql
host = os.getenv("DATABRICKS_HOST")
http_path = os.getenv("DATABRICKS_HTTP_PATH")
access_token = os.getenv("DATABRICKS_TOKEN")
connection = sql.connect(
server_hostname=host,
http_path=http_path,
access_token=access_token)
cursor = connection.cursor()
print("> schemas('`dev`')")
cursor.schemas('`dev`') # quoted name, I get (global_temp) only
result = cursor.fetchall()
for row in result:
print(row)
print("> schemas('dev')")
cursor.schemas('dev') # unquoted name, I get (default, my_schema, global_temp)
result = cursor.fetchall()
for row in result:
print(row)
cursor.close()
connection.close()
I'd expect the same behavior for both, since this is what dbt-databricks is apparently expecting too.
A unwanted side effect for dbt-databricks is https://github.com/databricks/dbt-databricks/issues/464
- Dominant language
- Python
- Stars
- 233
- Forks
- 152
- Avg merge
- 21h 5m
- Merged PRs (30d)
- 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from databricks/databricks-sql-python
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
All issues in databricks/databricks-sql-python
Similar issues
-
essnmx good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
[Feature] 奇物选择添加优先级 Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
syfoud/Simulated_Scepter#174 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Giskard-AI/giskard-oss#2840 · 1 comment ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Openarea: repo bug perceived difficulty: 2
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
yeti-platform/yeti#1380 ·