Open
Description
Bug description
The error is that the Jinja macro "Dataset" is replaced by a subquery using an alias with the keyword "as" in the "from" clause. In SQL syntax, the keyword "as" is optional in the "from" clause and Oracle DB does not support it at all. This leads to the inability to use the "Dataset" macro with Oracle DB.
Steps to reproduce:
- Create a SQL query and set Oracle DB as the source database in SQLLab.
- Set the SQL text "select * from dual"
- Save this query as a dataset with the name "DUAL"
- Find the dataset_id of the created dataset (in URL for example)
- Create and execute a new query with the text "select * from {{dataset(X)}}", where X should be replaced with the dataset_id from step 4.
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
Not applicable
Node version
Not applicable
Browser
Not applicable
Additional context
- Set feature flag ENABLE_TEMPLATE_PROCESSING to True
- Use any Oracle Database for queries.
log.txt
Checklist
- I have searched Superset docs and Slack and didn't find a solution to my problem.
- I have searched the GitHub issue tracker and didn't find a similar bug report.
- 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.