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

Commita799ee7

Browse files
authored
Merge pull request#8 from sede-open/task/exclude-views-from-get-table-names
Removed commented out old method
2 parents84318f4 +b348193 commita799ee7

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

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

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -259,28 +259,12 @@ def get_table_names(self, connection, schema=None, **kwargs):
259259
AND table_type = 'MANAGED';""".format(
260260
schema_str
261261
)
262+
# TODO: Add if scenario for None schema
262263
data=cur.execute(sql_str).fetchall()
263264
_tables= [i[TABLE_NAME]foriindata]
264265

265266
return_tables
266267

267-
# TODO: Commented out this until can be deleted after successful tests
268-
# def get_table_names(self, connection, schema=None, **kwargs):
269-
# TABLE_NAME = 1
270-
# catalog = "`" + self.catalog + "`"
271-
# schema = ("`" + schema + "`") or ("`" + self.schema + "`")
272-
#
273-
# with self.get_driver_connection(
274-
# connection
275-
# )._dbapi_connection.dbapi_connection.cursor() as cur:
276-
# sql_str = "SHOW TABLES FROM {}".format(
277-
# ".".join([catalog, schema])
278-
# )
279-
# data = cur.execute(sql_str).fetchall()
280-
# _tables = [i[TABLE_NAME] for i in data]
281-
#
282-
# return _tables
283-
284268
defget_view_names(self,connection,schema=None,**kwargs):
285269
VIEW_NAME=1
286270
withself.get_driver_connection(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp