Skip to content

Commit

Permalink
[get_df] Updating multi-statement logic (apache#5517)
Browse files Browse the repository at this point in the history
  • Loading branch information
john-bodley authored Jul 31, 2018
1 parent f28a956 commit 3ad4e9b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion superset/models/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,8 +738,12 @@ def needs_conversion(df_series):

with closing(engine.raw_connection()) as conn:
with closing(conn.cursor()) as cursor:
for sql in sqls:
for sql in sqls[:-1]:
self.db_engine_spec.execute(cursor, sql)
cursor.fetchall()

self.db_engine_spec.execute(cursor, sqls[-1])

df = pd.DataFrame.from_records(
data=list(cursor.fetchall()),
columns=[col_desc[0] for col_desc in cursor.description],
Expand Down

0 comments on commit 3ad4e9b

Please sign in to comment.