GitHub user dosubot[bot] added a comment to the discussion: Want to access two schema/database information using on database connection in superset if database/schema coming from starrock query engine
<!-- Answer --> Superset shows only the databases and schemas that the StarRocks user (in your connection string) has permission to access. If you connect Superset using user1, and user1 only has access to db1 and db2 in StarRocks, then only those databases will be visible and accessible in Superset—db3 will not appear. There is no extra configuration needed in Superset for this; it relies entirely on the permissions of the StarRocks user you use for the connection. This is handled by the StarRocks engine spec in Superset, which uses the user’s privileges to discover available databases and schemas ([source](https://github.com/apache/superset/blob/6876a1e6843cd1f28f4206ca2dd75342dfddcf26/superset/db_engine_specs/starrocks.py)). If you need more advanced control (like switching credentials based on Superset roles), you can use the `DB_CONNECTION_MUTATOR` function in your Superset config to dynamically change the connection details based on the logged-in user or their roles ([discussion](https://github.com/apache/superset/discussions/32818)). But for your scenario, just ensure user1 in StarRocks has access only to db1 and db2, and use user1’s credentials in your Superset database connection. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/95b5cda4-1e5f-4095-b79b-26ed7f56e399?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/95b5cda4-1e5f-4095-b79b-26ed7f56e399?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/95b5cda4-1e5f-4095-b79b-26ed7f56e399?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/95b5cda4-1e5f-4095-b79b-26ed7f56e399?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/95b5cda4-1e5f-4095-b79b-26ed7f56e399?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/95b5cda4-1e5f-4095-b79b-26ed7f56e399?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/95b5cda4-1e5f-4095-b79b-26ed7f56e399?feedback_type=other)</sup> [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/33901) GitHub link: https://github.com/apache/superset/discussions/33911#discussioncomment-13576255 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
