From e12140f21e592405c52286a397432ac65704964b Mon Sep 17 00:00:00 2001 From: jacobpascalcoblentz Date: Tue, 24 Oct 2023 12:20:27 -0700 Subject: [PATCH 1/2] Update vertica_python.py --- sqla_vertica_python/vertica_python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqla_vertica_python/vertica_python.py b/sqla_vertica_python/vertica_python.py index 609977a..ea93d32 100755 --- a/sqla_vertica_python/vertica_python.py +++ b/sqla_vertica_python/vertica_python.py @@ -107,7 +107,7 @@ def create_connect_args(self, url): return [[], opts] - def has_schema(self, connection, schema): + def has_schema(self, connection, schema, info_cache=None): query = ("SELECT EXISTS (SELECT schema_name FROM v_catalog.schemata " "WHERE schema_name='%s')") % (schema) rs = connection.execute(text(query)) From ce16a0a2786ff9f71775108aa821875c8061b203 Mon Sep 17 00:00:00 2001 From: jacobpascalcoblentz Date: Tue, 24 Oct 2023 12:48:53 -0700 Subject: [PATCH 2/2] small edit to work w/ pd.to_sql --- sqla_vertica_python/vertica_python.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sqla_vertica_python/vertica_python.py b/sqla_vertica_python/vertica_python.py index ea93d32..bf2fe6d 100755 --- a/sqla_vertica_python/vertica_python.py +++ b/sqla_vertica_python/vertica_python.py @@ -107,14 +107,14 @@ def create_connect_args(self, url): return [[], opts] - def has_schema(self, connection, schema, info_cache=None): + def has_schema(self, connection, schema): query = ("SELECT EXISTS (SELECT schema_name FROM v_catalog.schemata " "WHERE schema_name='%s')") % (schema) rs = connection.execute(text(query)) return bool(rs.scalar()) - def has_table(self, connection, table_name, schema=None): + def has_table(self, connection, table_name, schema=None, info_cache=None): if schema is None: schema = self._get_default_schema_name(connection) query = ("SELECT EXISTS ("