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
{{ message }}
Repository navigation
SAP HANA calculation view call with PLACEHOLDER parameters is re-cased by Superset 6.0.0 and causes "invalid table name" (HANA error 259) #39328
Run the following SQL: SELECT * FROM _sys_bic."zbw.10_001/INVENTORY" ( 'PLACEHOLDER' = ('$$IP_DATE_TO$$', ''), 'PLACEHOLDER' = ('$$IP_DATE_FROM$$', '') )
Superset returns error: SAP HANA Error hana error: (259, 'invalid table name: Could not find table/view ZBW.10_001/INVENTORY in schema _SYS_BIC: line 6 col 17 (at pos 49)')
If run the same SQL query without PLACEHOLDER, it's OK: SELECT * FROM _sys_bic."zbw.10_001/INVENTORY"
If run the same SQL query without PLACEHOLDER, but with "ZBW" in uppercase the error is repeated (even in Superset 5.0.0): SELECT * FROM _sys_bic."ZBW.10_001/INVENTORY"
Screenshots/recordings
No response
Superset version
6.0.0
Python version
3.11
Node version
I don't know
Browser
Chrome
Additional context
No response
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.
Hi @ku7mich! I'm Dosu and I’m helping the superset team.
This is caused by Superset 6.0.0 always parsing and regenerating SQL queries through sqlglot before execution [1]. SAP HANA is mapped to the PostgreSQL dialect in sqlglot [2], and when sqlglot regenerates your SQL, it uppercases the quoted identifier "zbw.10_001/INVENTORY" → "ZBW.10_001/INVENTORY", which breaks the case-sensitive HANA lookup.
Between Superset 5.0.0 and 6.0.0, sqlglot was upgraded from v27 to v28, which likely changed how the PostgreSQL dialect handles quoted identifiers with special characters like . and /. This is part of a broader pattern — several databases (PostgreSQL, SQL Server, Oracle, ClickHouse) have reported sqlglot regeneration corrupting queries in 6.0.0.
Workaround options:
Create a HANA view that wraps the calculation view with PLACEHOLDERs, and query that view from Superset instead.
Downgrade to Superset 5.0.0 if this is a blocker.
For a proper fix, this likely needs either:
A custom sqlglot dialect for SAP HANA (similar to what was done for Pinot) that preserves identifier casing correctly.
Or a change to the HANA dialect mapping in superset/sql/parse.py to use a dialect that doesn't uppercase quoted identifiers.
Or reporting the specific identifier uppercasing behavior to the sqlglot project as a bug.
You can verify this is the root cause by checking what SQL Superset actually sends to HANA — look at the executed_sql field in the query history, or test parsing/regenerating your query directly with sqlglot v28 using the PostgreSQL dialect.
Activity
dosubot commentedon Apr 13, 2026
Hi @ku7mich! I'm Dosu and I’m helping the superset team.
This is caused by Superset 6.0.0 always parsing and regenerating SQL queries through sqlglot before execution [1]. SAP HANA is mapped to the PostgreSQL dialect in sqlglot [2], and when sqlglot regenerates your SQL, it uppercases the quoted identifier
"zbw.10_001/INVENTORY"→"ZBW.10_001/INVENTORY", which breaks the case-sensitive HANA lookup.Between Superset 5.0.0 and 6.0.0, sqlglot was upgraded from v27 to v28, which likely changed how the PostgreSQL dialect handles quoted identifiers with special characters like
.and/. This is part of a broader pattern — several databases (PostgreSQL, SQL Server, Oracle, ClickHouse) have reported sqlglot regeneration corrupting queries in 6.0.0.Workaround options:
For a proper fix, this likely needs either:
superset/sql/parse.pyto use a dialect that doesn't uppercase quoted identifiers.You can verify this is the root cause by checking what SQL Superset actually sends to HANA — look at the
executed_sqlfield in the query history, or test parsing/regenerating your query directly with sqlglot v28 using the PostgreSQL dialect.To reply, just mention @dosu.
Docs are dead. Just use Dosu.
fix(sql): preserve quoted-identifier casing for the HANA dialect (#39328
fix(sql): preserve quoted-identifier casing for the HANA dialect (#39328