question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Superset chart incorrectly throwing error Virtual dataset query must be read-only

See original GitHub issue

A 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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mistercrunchcommented, Oct 20, 2020

For reference, I think this is where the lack of magic happens: https://github.com/andialbrecht/sqlparse/blob/master/sqlparse/sql.py#L425-L436

0reactions
serenajiangcommented, Oct 21, 2020

fixed in #11365

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found