You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/04/17 19:51:00 UTC
[GitHub] [incubator-superset] sbuttinger opened a new issue #7317: [SQL Lab]
MS SQL non-select queries produce ProgrammingError
sbuttinger opened a new issue #7317: [SQL Lab] MS SQL non-select queries produce ProgrammingError
URL: https://github.com/apache/incubator-superset/issues/7317
Non-SELECT queries in SQL Lab against MS SQL databases produce a ProgrammingError that is surfaced in the Superset UI despite query success.
### Expected results
Running successful non-SELECT (CREATE, INSERT, UPDATE.. etc.) queries do not produce an error in the Superset UI.
### Actual results
Running successful non-SELECT (CREATE, INSERT, UPDATE.. etc.) queries produce the following misleading error message: "No results. Previous SQL was not a query".
#### Screenshots
<img width="1660" alt="error_screenshot1" src="https://user-images.githubusercontent.com/20545868/56313495-94c34000-6107-11e9-8e67-db2bb91dae1f.png">
<img width="1657" alt="error_screenshot2" src="https://user-images.githubusercontent.com/20545868/56313502-9856c700-6107-11e9-86d6-19d2d278bfec.png">
<img width="1658" alt="error_screenshot3" src="https://user-images.githubusercontent.com/20545868/56313527-a60c4c80-6107-11e9-876d-682afe70cf74.png">
#### How to reproduce the bug
1. Go to 'SQL Lab'
2. Select MS SQL Database as source
3. Run non-SELECT query
4. See error
### Environment
- superset version: [0.31.0rc18 ]
### Python Stacktrace
> 2019-04-17 18:46:47,744:DEBUG:root:[stats_logger] (timing) sqllab.query.time_executing_query | 732.540283203125
2019-04-17 18:46:47,744:ERROR:root:No results. Previous SQL was not a query.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/superset/sql_lab.py", line 191, in execute_sql
data = db_engine_spec.fetch_data(cursor, query.limit)
File "/usr/local/lib/python3.6/site-packages/superset/db_engine_specs.py", line 1280, in fetch_data
data = super(MssqlEngineSpec, cls).fetch_data(cursor, limit)
File "/usr/local/lib/python3.6/site-packages/superset/db_engine_specs.py", line 118, in fetch_data
return cursor.fetchall()
pyodbc.ProgrammingError: No results. Previous SQL was not a query.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org