Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Removed commented out old method #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions src/databricks/sqlalchemy/dialect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,28 +259,12 @@ def get_table_names(self, connection, schema=None, **kwargs):
AND table_type = 'MANAGED';""".format(
schema_str
)
# TODO: Add if scenario for None schema
data = cur.execute(sql_str).fetchall()
_tables = [i[TABLE_NAME] for i in data]

return _tables

# TODO: Commented out this until can be deleted after successful tests
# def get_table_names(self, connection, schema=None, **kwargs):
# TABLE_NAME = 1
# catalog = "`" + self.catalog + "`"
# schema = ("`" + schema + "`") or ("`" + self.schema + "`")
#
# with self.get_driver_connection(
# connection
# )._dbapi_connection.dbapi_connection.cursor() as cur:
# sql_str = "SHOW TABLES FROM {}".format(
# ".".join([catalog, schema])
# )
# data = cur.execute(sql_str).fetchall()
# _tables = [i[TABLE_NAME] for i in data]
#
# return _tables

def get_view_names(self, connection, schema=None, **kwargs):
VIEW_NAME = 1
with self.get_driver_connection(
Expand Down