mirror of https://github.com/apache/superset.git
[hotfix] 'No numeric types to aggregate'
This commit is contained in:
parent
2395fbbdaa
commit
fe3f5f69ae
|
@ -575,13 +575,7 @@ class Database(Model, AuditMixinNullable):
|
|||
def get_df(self, sql, schema):
|
||||
sql = sql.strip().strip(';')
|
||||
eng = self.get_sqla_engine(schema=schema)
|
||||
|
||||
conn = eng.raw_connection()
|
||||
cur = conn.cursor()
|
||||
cur.execute(sql, **self.db_engine_spec.cursor_execute_kwargs)
|
||||
|
||||
cols = [col[0] for col in cur.description]
|
||||
df = pd.DataFrame(list(cur.fetchall()), columns=cols)
|
||||
df = pd.read_sql(sql, eng)
|
||||
|
||||
def needs_conversion(df_series):
|
||||
if df_series.empty:
|
||||
|
|
Loading…
Reference in New Issue