Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4c79a9f

Browse files
authored
Merge pull request#4 from PeterDKay/task/add-schema-backslash-get-tables
get tables function modified
2 parents3f211ec +62c7931 commit4c79a9f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/databricks/sqlalchemy/dialect/__init__.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,13 @@ def get_indexes(self, connection, table_name, schema=None, **kw):
247247
defget_table_names(self,connection,schema=None,**kwargs):
248248
TABLE_NAME=1
249249
catalog="`"+self.catalog+"`"
250+
schema= ("`"+schema+"`")or ("`"+self.schema+"`")
250251

251252
withself.get_driver_connection(
252253
connection
253254
)._dbapi_connection.dbapi_connection.cursor()ascur:
254255
sql_str="SHOW TABLES FROM {}".format(
255-
".".join([catalog,schemaorself.schema])
256+
".".join([catalog,schema])
256257
)
257258
data=cur.execute(sql_str).fetchall()
258259
_tables= [i[TABLE_NAME]foriindata]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp