Superset chart incorrectly throwing error Virtual dataset query must be read-only
See original GitHub issueA chart built off of a virtual datasource is erroring saying that the virtual datasource must be readonly but the query is only a select query (it is not modifying any table). It does contain WITH statements, and removing the WITH statements doesn’t result in the error. It seems like queries with WITH statements are getting miscategorized as “Readonly”.
Result:
Error thrown: Virtual dataset query must be read-only
Expected Result: Chart should load
Looks like regression caused by https://github.com/apache/incubator-superset/pull/11236#issuecomment-710669738
Environment
(please complete the following information):
- superset version: master
Checklist
Make sure these boxes are checked before submitting your issue - thank you!
- I have checked the superset logs for python stacktraces and included it here as text if there are any.
- I have reproduced the issue with at least the latest released version of superset.
- I have checked the issue tracker for the same issue and I haven’t found one similar.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Superset chart incorrectly throwing error Virtual dataset query ...
A chart built off of a virtual datasource is erroring saying that the virtual datasource must be readonly but the query is only...
Read more >[GitHub] [incubator-superset] ktmud commented on issue #11310 ...
[GitHub] [incubator-superset] ktmud commented on issue #11310: Superset chart incorrectly throwing error Virtual dataset query must be read-only.
Read more >Saving SQL Lab query as dataset? - apache superset
Good question. A virtual dataset in Superset is more / less really just a query (albeit with some optional additions, like jinja templated ......
Read more >Issue Code Reference - Apache Superset
Your query failed because it is referencing a table that no longer exists in the underlying database. You should modify your query to...
Read more >1 Working with Database Sessions - Oracle Help Center
When a database exception occurs during the execution of a query, the exception is passed to the exception handler instead of being thrown....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For reference, I think this is where the lack of magic happens: https://github.com/andialbrecht/sqlparse/blob/master/sqlparse/sql.py#L425-L436
fixed in #11365