Skip to content
Open
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
11 changes: 7 additions & 4 deletions snowflake/class_SnowflakeDataTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
"""
class SnowflakeDataTool:
def __init__(self):
# List of tables
self._sfTables = []

# Snowflake connection object
self._sfConnection = self.connect()
self._sfConnection = None
self.connect()

self._sfTables = []

#----- PUBLIC METHODS-----#
def connect(self, schema:str=None):
Expand All @@ -29,7 +32,7 @@ def connect(self, schema:str=None):
else:
self._query_table_list()

return
return None

def is_connected(self):
"""Verify if connected to Snowflake database"""
Expand Down Expand Up @@ -71,7 +74,7 @@ def _connection_options(self):
connOptions = {
"sfUrl": "https://<address>.snowflakecomputing.com/",
"sfUser": "User",
"sfPassword": "Password"
"sfPassword": "Password",
"sfDatabase": "Database",
"sfSchema": self.snowflake_schema,
"sfWarehouse": "Warehouse",
Expand Down