Skip to content

Commit

Permalink
Fix: close Teradata connection via object delete (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhuayang-google committed Jul 1, 2022
1 parent e87d0ef commit 181b865
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions third_party/ibis/ibis_teradata/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ def __init__(self, host, user_name, password, port=1025, logmech='TD2', use_no_l
self.client = teradatasql.connect(**self.teradata_config)
self.use_no_lock_tables = use_no_lock_tables

def __del__ (self):
teradatasql.close()

def _execute(self, dml, results=False, **kwargs):
query = TeradataQuery(self, dml)
df = self._execute_query(query, **kwargs)
Expand Down

0 comments on commit 181b865

Please sign in to comment.