Skip to content

Commit

Permalink
Fix MSSQL connection close
Browse files Browse the repository at this point in the history
  • Loading branch information
zainhoda committed May 2, 2024
1 parent c85fe13 commit 7b962d5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/vanna/base/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1279,6 +1279,7 @@ def run_sql_mssql(sql: str):
# Execute the SQL statement and return the result as a pandas DataFrame
with engine.begin() as conn:
df = pd.read_sql_query(sa.text(sql), conn)
conn.close()
return df

raise Exception("Couldn't run sql")
Expand Down

0 comments on commit 7b962d5

Please sign in to comment.