GitHub user dosubot[bot] added a comment to the discussion: Multiple DB connection join in Superset Dataset
<!-- Greeting --> Hi @wadooodd! I'm [Dosu](https://go.dosu.dev/dosubot) and Iām helping the superset team. <!-- Answer --> Superset does not natively support joining tables from different database connections in a single dataset, unlike Tableau. However, there is an experimental feature called the "Superset meta database" that enables cross-database joins using a special connection (`superset://`). With this enabled, you can write queries like: ```sql SELECT * FROM "DB_A.schema.table1" JOIN "DB_B.schema.table2" ON ... ``` To use it, set the `ENABLE_SUPERSET_META_DB` feature flag to `true`, then add a new database of type "Superset meta database" with the SQLAlchemy URI `superset://`. You can restrict which databases are accessible via the `allowed_dbs` engine parameter. Permissions and row-level security are enforced, but all joins and aggregations happen in memory, so this is only suitable for moderate data sizes and comes with security and performance risks. More details and configuration steps are in the [official documentation](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/docs/docs/configuration/databases.mdx). If you need production-grade cross-database joins, consider using a federated query engine like Presto/Trino and connecting Superset to it as a single source. <!-- 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/2204b4ed-9455-4092-8390-0f3332a92985?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/2204b4ed-9455-4092-8390-0f3332a92985?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/2204b4ed-9455-4092-8390-0f3332a92985?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/2204b4ed-9455-4092-8390-0f3332a92985?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/2204b4ed-9455-4092-8390-0f3332a92985?feedback_type=hallucination) | [Report š](https://app.dosu.dev/response-feedback/2204b4ed-9455-4092-8390-0f3332a92985?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/2204b4ed-9455-4092-8390-0f3332a92985?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)& nbsp;[](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/discussions/34902) GitHub link: https://github.com/apache/superset/discussions/34902#discussioncomment-14255083 ---- 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]
