Skip to content

Commit 5d62ac9

Browse files
authored
Bugfix to dialect for describe table
- has_table did not include schema in the 'DESCRIBE TABLE" SQL. - This is now included. And allows the alembic_version table to be stored within different schemas to default.
1 parent 85586bc commit 5d62ac9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/databricks/sqlalchemy/dialect/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def has_table(self, connection, table_name, schema=None, **kwargs) -> bool:
287287
DBR_GT_12_NOT_FOUND_STRING = "TABLE_OR_VIEW_NOT_FOUND"
288288

289289
try:
290-
res = connection.execute(f"DESCRIBE TABLE {table_name}")
290+
res = connection.execute(f"DESCRIBE TABLE `{schema}`.{table_name}")
291291
return True
292292
except DatabaseError as e:
293293
if DBR_GT_12_NOT_FOUND_STRING in str(

0 commit comments

Comments
 (0)