Looks like an old bug from previous versions specific to the "Table" visualization when no columns were selected. Is that the case?
Max On Mon, Aug 28, 2017 at 5:18 AM, Erisa Dervishi < [email protected]> wrote: > My datamart is in an old mysql db (5.6.35). I am able to setup the db > connection through Superset UI, and I am able to connect to the db, but > whenever I try to add a new table as a datasource I get the following: > > *2017-08-28 11:46:20,123:ERROR:root:(_mysql_exceptions.ProgrammingError) > (1064, "You have an error in your SQL syntax; check the manual that > corresponds to your MySQL server version for the right syntax to use near > 'FROM currency_fact\nLIMIT 50000' at line 2") [SQL: u'SELECT\nFROM > currency_fact\nLIMIT 50000']* > *Traceback (most recent call last):* > * File > "/home/erisadervishi/venv/local/lib/python2.7/site- > packages/superset/connectors/sqla/models.py", > line 559, in query* > * df = self.database.get_df(sql, self.schema)* > * File > "/home/erisadervishi/venv/local/lib/python2.7/site- > packages/superset/models/core.py", > line 582, in get_df* > * df = pd.read_sql(sql, eng)* > * File > "/home/erisadervishi/venv/local/lib/python2.7/site- > packages/pandas/io/sql.py", > line 416, in read_sql* > * chunksize=chunksize)* > * File > "/home/erisadervishi/venv/local/lib/python2.7/site- > packages/pandas/io/sql.py", > line 1087, in read_query* > * result = self.execute(*args)* > * File > "/home/erisadervishi/venv/local/lib/python2.7/site- > packages/pandas/io/sql.py", > line 978, in execute* > * return self.connectable.execute(*args, **kwargs)* > * File > "/home/erisadervishi/venv/local/lib/python2.7/site- > packages/sqlalchemy/engine/base.py", > line 2064, in execute* > * return connection.execute(statement, *multiparams, **params)* > * File > "/home/erisadervishi/venv/local/lib/python2.7/site- > packages/sqlalchemy/engine/base.py", > line 939, in execute* > * return self._execute_text(object, multiparams, params)* > * File > "/home/erisadervishi/venv/local/lib/python2.7/site- > packages/sqlalchemy/engine/base.py", > line 1097, in _execute_text* > * statement, parameters* > * File > "/home/erisadervishi/venv/local/lib/python2.7/site- > packages/sqlalchemy/engine/base.py", > line 1189, in _execute_context* > * context)* > * File > "/home/erisadervishi/venv/local/lib/python2.7/site- > packages/sqlalchemy/engine/base.py", > line 1402, in _handle_dbapi_exception* > * exc_info* > * File > "/home/erisadervishi/venv/local/lib/python2.7/site- > packages/sqlalchemy/util/compat.py", > line 203, in raise_from_cause* > * reraise(type(exception), exception, tb=exc_tb, cause=cause)* > * File > "/home/erisadervishi/venv/local/lib/python2.7/site- > packages/sqlalchemy/engine/base.py", > line 1182, in _execute_context* > * context)* > * File > "/home/erisadervishi/venv/local/lib/python2.7/site- > packages/sqlalchemy/engine/default.py", > line 470, in do_execute* > * cursor.execute(statement, parameters)* > * File > "/home/erisadervishi/venv/local/lib/python2.7/site- > packages/MySQLdb/cursors.py", > line 250, in execute* > * self.errorhandler(self, exc, value)* > * File > "/home/erisadervishi/venv/local/lib/python2.7/site- > packages/MySQLdb/connections.py", > line 50, in defaulterrorhandler* > * raise errorvalue* > *ProgrammingError: (_mysql_exceptions.ProgrammingError) (1064, "You have > an > error in your SQL syntax; check the manual that corresponds to your MySQL > server version for the right syntax to use near 'FROM currency_fact\nLIMIT > 50000' at line 2") [SQL: u'SELECT\nFROM currency_fact\nLIMIT 50000']* > *2017-08-28 11:46:20,126:INFO:root:Caching for the next 86400 seconds* > > > Might that be because I am running in an older version of mysql? Superset > is running in a separate node where I have installed the latest version of > mysql which serves as the metadata db for superset, and I am as well > running the superset examples there, and I do not get these errors. Is > there any config setting I am missing when setting up the connection with > the datamart that can help me escape the new lines or expand them before > the query is executed? > > Thanks, > Erisa >
