Bug description

Hello, I'm using Superset in 5.0.0 and can't create charts with Apache Pinot as datasource anymore. Looks like the chart tool isn't using the correct SQLGLOT? The charts are using the dialect with backticks and schema instead without. I'm using a Postgres as meta database. I can't find anything mentioned in docs about this.

  1. Install pinotdb connector in image -> Apache Pinot Configuration Doc
  2. Create database connection in Superset UI
  3. Add a Pinot datasource
  4. Try to create a raw table from this valid data source
  5. Inspect Query in SQLAlchemy and see that its using backticks and not without

Do I need to install or configure anything else so that it recognizes the dialect correctly? Thank you!

Screenshots/recordings

Valid Datasource Overview:

Image

Error during chart building:

Image

Faulty Query:

Image

Expected Query:

Image

Superset version

5.0.0

Python version

3.11

Node version

I don't know

Browser

Chrome

Additional context

FROM <OUR_OWN_EXTENDED_IMAGE>/superset:5.0.0 # Own Image built with BUILD_TRANSLATIONS=true

USER root

ENV PYTHONPATH /app/pythonpath
ENV SUPERSET_CONFIG_PATH /app/superset_config.py

RUN . /app/.venv/bin/activate && \
    uv pip install \
    redis \
    psycopg2-binary \
    pinotdb \
    Pillow

COPY --chown=superset config/superset/superset_config.py /app/
COPY --chown=superset config/superset/assets/logo.svg /app/.venv/lib/python3.11/site-packages/superset/static/assets/images/logo.svg

USER superset

CMD ["/app/docker/entrypoints/run-server.sh"]
# superset_config.py
# ... other configs

SQLALCHEMY_DATABASE_URI="postgresql://superset:superset@superset-db:5432/superset" # Meta-Database

Database URI via Superset: pinot://pinot-broker:8099/query/sql?controller=http://pinot-controller:9000/

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.

Comment From: dosubot[bot]

Hi @NickTick92! I'm Dosu and I’m helping the superset team.

This issue happens because Superset 5.0.0 maps the Pinot engine to the MySQL dialect in its SQLGlot integration, which causes queries to be generated with MySQL-style syntax (like backticks and schema.table notation). Pinot doesn't support this syntax, so queries fail to run as expected. This mapping is hardcoded in Superset's code and there isn't a user-facing config or workaround to change the dialect mapping or quoting behavior for Pinot datasources in 5.0.0 [source].

There's nothing missing in your installation or configuration—this is a limitation in how Superset currently handles Pinot SQL dialects. Fixing it would require either a dedicated Pinot dialect in SQLGlot, a custom override in Superset's Pinot engine spec, or a change to the central dialect mapping in the codebase. For now, the only workaround is to manually edit queries before running them, or to track for future updates that address Pinot dialect support.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X