nathan-gilbert opened a new issue, #30705:
URL: https://github.com/apache/superset/issues/30705

   ### Bug description
   
   Create an SQL query against a Postgresql database like so:
   
   ```sql
   WITH roles AS (
     SELECT 'Goodbye!'
   )
   SELECT 'Hello!'
   ```
   
   See `Only SELECT statements are allowed against this database.`
   
   It should either allow `roles` be a name for a CTE or call this out 
somewhere in the documentation. I looked and couldn't find any mention of it.
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   4.0.2
   
   ### Python version
   
   3.11
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   Stacktrace:
   ```
   Traceback (most recent call last):
   <removed>
   File 
"/srv/.../venv/lib/python3.11/site-packages/superset/commands/sql_lab/execute.py",
 line 103, in run
       status = self._run_sql_json_exec_from_scratch()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/srv/.../venv/lib/python3.11/site-packages/superset/commands/sql_lab/execute.py",
 line 163, in _run_sql_json_exec_from_scratch
       raise ex
     File 
"/srv/.../venv/lib/python3.11/site-packages/superset/commands/sql_lab/execute.py",
 line 158, in _run_sql_json_exec_from_scratch
       return self._sql_json_executor.execute(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   superset.exceptions.SupersetErrorsException: [SupersetError(message='Only 
SELECT statements are allowed against this database.', 
error_type=<SupersetErrorType.DML_NOT_ALLOWED_ERROR: 'DML_NOT_ALLOWED_ERROR'>, 
level=<ErrorLevel.ERROR: 'error'>, extra={'issue_codes': [{'code': 1022, 
'message': 'Issue 1022 - Database does not allow data manipulation.'}]})]
   ```
   
   ### Checklist
   
   - [X] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [X] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [X] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to