Skip to content

Commit

Permalink
πŸ› Trying to fix query executions
Browse files Browse the repository at this point in the history
  • Loading branch information
henryhamon committed Jul 29, 2024
1 parent 987720c commit 9ad23d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/sqlzilla/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ def db_connection(iris_conn_str):

# Function to run query using SQLAlchemy and return result as DataFrame
def run_query():
if st.session_state.code_text is None:
return
try:
engine = db_connection(db_connection_str())
cursor = engine.connect().cursor()
cursor = engine.connect().connection.cursor()
result = cursor.execute(st.session_state.code_text)
data = result.fetchall()
columns = result.keys()
Expand Down

0 comments on commit 9ad23d5

Please sign in to comment.