Not able to run any SQL query on SQL lab #36710
Replies: 12 comments
-
|
Hi @ABDevops-test! I'm Dosu and I’m helping the superset team. This issue is likely caused by how Superset handles impersonation for StarRocks connections during query execution. When running queries in SQL Lab, Superset may execute a pre-query like Here’s a checklist to help resolve this:
If impersonation is not needed, disabling it is often the quickest fix. If you need impersonation, ensure the StarRocks user has the right privileges and that the pre-query works when run manually. For more details, see the StarRocks Superset integration docs. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
|
@dosu
|
Beta Was this translation helpful? Give feedback.
-
|
Since impersonation is disabled and queries work in your terminal but not in Superset, the issue is likely with Superset’s connection configuration or environment. Here are the most common causes and next steps:
If you share your Superset connection string, Extra JSON, and the exact driver versions, I can help spot any mismatches. Also, check Superset and StarRocks logs for more detailed error messages—they often pinpoint where authentication is failing. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
|
Below is the starrocks driver version
connection string |
Beta Was this translation helpful? Give feedback.
-
|
Your StarRocks driver version (1.2.2) is not compatible with Superset’s required SQLAlchemy version (1.4.54). This mismatch can cause authentication errors when running queries, even if the connection appears successful and tables are visible. The recommended fix is to downgrade the StarRocks driver to version 1.0.6, which works with SQLAlchemy 1.4.54 and resolves these issues source. Also, make sure your connection string follows the format If you still see errors after downgrading, check your Superset database “Extra” JSON for any SSL or authentication options, and confirm your endpoint isn’t a read-only replica. If you want, share your Extra JSON and the full connection string (with sensitive info redacted) for a more detailed review. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
|
Hopefully the bot is right, and that resolves it. Let us know if not! |
Beta Was this translation helpful? Give feedback.
-
|
I did install StarRocks driver to version 1.0.6 as per below. But still issue persists. Please suggest.
|
Beta Was this translation helpful? Give feedback.
-
|
@rusackas |
Beta Was this translation helpful? Give feedback.
-
|
Kindly check above comments and let me know if anything i can do from my end. @rusackas |
Beta Was this translation helpful? Give feedback.
-
|
Hello @ABDevops-test in a way it's nice that you're having the trouble with Postgres too since that shifts the focus from "some edge case related to StarRocks" to a general config problem. Superset definitely works with Postgres, that's what we test CI with. So I'd keep focusing on debugging that connection instead of StarRocks. Also I see you marked that you're running the master branch, which could be unstable. If that's true, instead try to debug with e.g. 6.0.0rc4 which is not officially released but has been nice and stable in my testing. |
Beta Was this translation helpful? Give feedback.
-
|
@ABDevops-test, I also have a StarRocks database connection configured and working. I can give you some information on the configuration I've used as a point of reference: VersionI'm running 5.0.0 and 6.0.0rc2 or maybe rc3 with these settings. I do have a custom build that I'm using. StarRocks is version 3.4.4-bc987bb DockerfileThis is the Dockerfile I use to build the image I'm using, minus some customizations and packages irrelevant to this issue. It is based on the example in the docs. ARG SUPERSET_TAG=5.0.0
FROM apache/superset:${SUPERSET_TAG}
USER root
# Set environment variable for Playwright
ENV PLAYWRIGHT_BROWSERS_PATH=/usr/local/share/playwright-browsers
# Add build-essential to allow building python packages
RUN /app/docker/apt-install.sh build-essential default-libmysqlclient-dev pkg-config
# Install packages using uv into the virtual environment
RUN . .venv/bin/activate && \
uv pip install --no-cache-dir \
authlib \
flask-caching \
mysqlclient \
pillow \
playwright \
psycopg2-binary \
redis \
starrocks==1.2.2 \
&& playwright install-deps \
&& PLAYWRIGHT_BROWSERS_PATH=/usr/local/share/playwright-browsers playwright install chromium
USER superset
CMD ["https://github.com/app/docker/entrypoints/run-server.sh"]Python packages I have explicitly added that are relevant to StarRocks:
StarRocks
-- If you're providing permissions via roles, you might need/want to make sure they're applied at login, or you can set the default role, as I've done below.
SET GLOBAL activalte_all_roles_on_login = TRUE;
CREATE DATABASE example_db;
SET CATALOG default_catalog;
CREATE ROLE IF NOT EXISTS reader;
GRANT SELECT ON ALL TABLES IN DATABASE example_db TO ROLE reader;
CREATE USER test_user IDENTIFIED BY 'some-password' DEFAULT ROLE reader; |
Beta Was this translation helpful? Give feedback.
-
|
Thanks @lilotter45, that's helpful context and additional info for future readers! Given that this seems not to be reproducible, I'm going to convert this to a discussion. @ABDevops-test if you're able to provide additional information that allows others to reproduce this and verify that indeed there's a bug in the Superset codebase that needs fixing, we'll chat here and then open a new, more specific report with the actual bug documented. |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Bug description
I have created a connection to StarRocks in Apache Superset using the StarRocks dialect. However, when I try to run an SQL query (even a simple SELECT) in Superset’s SQL Lab, I get an “authentication required” error — indicating an issue with the StarRocks database connection. Database connection is already successfully connected and able to see tables created in starrocks but not able to run any query on it.
Can anyone please help here?
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
Beta Was this translation helpful? Give feedback.
All reactions