Skip to content

Commit

Permalink
Strip sql and remove ; for csv download. (#1508)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkyryliuk committed Nov 1, 2016
1 parent 5238053 commit 769fb08
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions caravel/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,7 @@ def get_quoter(self):
return self.get_sqla_engine().dialect.identifier_preparer.quote

def get_df(self, sql, schema):
sql = sql.strip().strip(';')
eng = self.get_sqla_engine(schema=schema)
cur = eng.execute(sql, schema=schema)
cols = [col[0] for col in cur.cursor.description]
Expand Down

0 comments on commit 769fb08

Please sign in to comment.