mirror of https://github.com/apache/superset.git
Strip sql and remove ; for csv download. (#1508)
This commit is contained in:
parent
52380534f3
commit
769fb0820f
|
@ -697,6 +697,7 @@ class Database(Model, AuditMixinNullable):
|
||||||
return self.get_sqla_engine().dialect.identifier_preparer.quote
|
return self.get_sqla_engine().dialect.identifier_preparer.quote
|
||||||
|
|
||||||
def get_df(self, sql, schema):
|
def get_df(self, sql, schema):
|
||||||
|
sql = sql.strip().strip(';')
|
||||||
eng = self.get_sqla_engine(schema=schema)
|
eng = self.get_sqla_engine(schema=schema)
|
||||||
cur = eng.execute(sql, schema=schema)
|
cur = eng.execute(sql, schema=schema)
|
||||||
cols = [col[0] for col in cur.cursor.description]
|
cols = [col[0] for col in cur.cursor.description]
|
||||||
|
|
Loading…
Reference in New Issue