dosubot[bot] commented on issue #17182: URL: https://github.com/apache/superset/issues/17182#issuecomment-3644072081
<!-- Answer --> This Athena schema issue is likely resolved in Superset 5.0+ thanks to dynamic schema support added in [PR #36003](https://github.com/apache/superset/pull/36003). Now, when you select a schema in SQL Lab or Dataset configuration, Superset should correctly use that schema for Athena queries, rather than defaulting to the one in the connection URI. The reason the `schema_name` parameter in the connection URI wasn't respected before is that Superset's backend expects the schema to be specified by the frontend/API when listing tables or schemas, not just in the URI. The Athena engine spec doesn't override this behavior, so unless the UI sends the schema explicitly, the path segment in the URI is ignored for listing operations. This means schema selection is now dynamic and handled through the UI/API, not fixed at connection time [source](https://github.com/apache/superset/blob/master/superset/databases/api.py). As for @omkenge's connection string approach, it matches the recommended format in Superset's docs, and users have discussed it in threads, but there's no explicit confirmation of widespread testing or documentation of that exact solution. If you still see schema visibility issues, double-check schema names and permissions, and consider upgrading to Superset 6.0.0-RC1 or later if you hit schema list refresh bugs in 5.0.0 [source](https://github.com/apache/superset/issues/35030). <!-- 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/f15d9d3b-1295-49f6-8500-5576e5c6b1be?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/f15d9d3b-1295-49f6-8500-5576e5c6b1be?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/f15d9d3b-1295-49f6-8500-5576e5c6b1be?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/f15d9d3b-1295-49f6-8500-5576e5c6b1be?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f15d9d3b-1295-49f6-8500-5576e5c6b1be?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/f15d9d3b-1295-49f6-8500-5576e5c6b1be?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f15d9d3b-1295-49f6-8500-5576e5c6b1be?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=This%20Athena%20schema%20issue%20is%20likely%20resolved%20in%20Superset%205.0%2B%20thanks%20to%20dynamic%20schema%20support%20added%20in%20%5BPR%20%2336003%5D%28https%3A//github.com/apache/superset/pull/36003%29.%20Now%2C%20when%20you%20select%20a%20schema%20in%20SQL%20Lab%20or%20Dataset%20configuration%2C%20Superset%20should%20correctly%20use%20that%20schema%20for%20Athena%20queries%2C%20rather%20than%20defaulting%20to%20the%20one%20in%20the%20connection%20URI.%0A%0AThe%20reason%20the%20%60schema_name%60%20parameter%20in%20the%20connection%20URI%20wasn%27t%20respected%20before%20is%20that%20Superset%27s%20backend%20expects%20the%20schema%20to%20be%20specified%20by%20the%20frontend/API%20when%20listing%20tables%20or%20schemas%2C%20not%20just%20in%2 0the%20URI.%20The%20Athena%20engine%20spec%20doesn%27t%20override%20this%20behavior%2C%20so%20unless%20the%20UI%20sends%20the%20schema%20explicitly%2C%20the%20path%20segment%20in%20the%20URI%20is%20ignored%20for%20listing%20operations.%20This%20means%20schema%20selection%20is%20now%20dynamic%20and%20handled%20through%20the%20UI/API%2C%20not%20fixed%20at%20connection%20time%20%5Bsource%5D%28https%3A//github.com/apache/superset/blob/master/superset/databases/api.py%29.%0A%0AAs%20for%20%40omkenge%27s%20connection%20string%20approach%2C%20it%20matches%20the%20recommended%20format%20in%20Superset%27s%20docs%2C%20and%20users%20have%20discussed%20it%20in%20threads%2C%20but%20there%27s%20no%20explicit%20confirmation%20of%20widespread%20testing%20or%20documentation%20of%20that%20exact%20solution.%20If%20you%20still%20see%20schema%20visibility%20issues%2C%20double-check%20schema%20names%20and%20permissions%2C%20and%20consider%20upgrading%20to%20Superset%206.0.0-RC1%20or%20later%20if%20you%20h it%20schema%20list%20refresh%20bugs%20in%205.0.0%20%5Bsource%5D%28https%3A//github.com/apache/superset/issues/35030%29.) [](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/17182) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
