You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This causes a problem for databases that cannot use the default CTE_ALIAS of '__cte'. In particular, this alias starts with an underscore, which may not be supported
How to reproduce the bug
Create Chart on a dataset containing a CTE
Expected results
Generate query like: WITH cte as (SELECT * from schema.table), MY_CTE_ALIAS AS (SELECT * from cte) SELECT id AS "id" FROM MY_CTE_ALIAS LIMIT 1000;
Actual results
WITH cte as (SELECT * from schema.table), MY_CTE_ALIAS AS (SELECT * from cte) SELECT id AS "id" FROM __cte LIMIT 1000;
Checklist
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.
The text was updated successfully, but these errors were encountered:
As it stands, the CTE_ALIAS used in superset/connectors/sqla/models.py cannot be changed by the db engine spec. Instead, it pulls the value from the base model.
This causes a problem for databases that cannot use the default CTE_ALIAS of '__cte'. In particular, this alias starts with an underscore, which may not be supported
How to reproduce the bug
Create Chart on a dataset containing a CTE
Expected results
Generate query like:
WITH cte as (SELECT * from schema.table),
MY_CTE_ALIAS AS (SELECT * from cte)
SELECT id AS "id"
FROM MY_CTE_ALIAS
LIMIT 1000;
Actual results
WITH cte as (SELECT * from schema.table),
MY_CTE_ALIAS AS (SELECT * from cte)
SELECT id AS "id"
FROM __cte
LIMIT 1000;
Checklist
The text was updated successfully, but these errors were encountered: