mirror of https://github.com/apache/superset.git
[get_df] Updating multi-statement logic (#5517)
This commit is contained in:
parent
8c822f1e9b
commit
e7d05127d1
|
@ -738,8 +738,12 @@ class Database(Model, AuditMixinNullable, ImportMixin):
|
|||
|
||||
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],
|
||||
|
|
Loading…
Reference in New Issue