mcdogg17 commented on PR #30518:
URL: https://github.com/apache/superset/pull/30518#issuecomment-2609425476

   Hi! The very idea of PR is described in this 
[SIP](https://github.com/apache/superset/issues/26646). Here I'll tell you more 
about the functionality itself. Previously, when saving a virtual dataset, it 
was impossible to use the `CREATE TEMP TABLE` and so on constructions. I 
implemented this function as follows: when saving a dataset, we execute the 
entire query, at the end of which there must be a SELECT, otherwise a following 
error will be raised:
   
   "CTAS (create table as select) can only be run with a query where the last 
statement is a SELECT. Please make sure your query has a SELECT as its last 
statement. Then, try running your query again."
   
   This is necessary to save a query for further use as a dataset. The last 
select expression will be used in a generated viz query as expected:
    
    `SELECT * FROM (select statement from query virtual dataset) as 
virtual_dataset`
    
    


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

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to