dosubot[bot] commented on issue #36683:
URL: https://github.com/apache/superset/issues/36683#issuecomment-3662388257

   <!-- Greeting -->
   Hi @gfody! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the 
superset team.
   
   <!-- Answer -->
   Superset v6.x now forces a database value into the ClickHouse connection 
URI, defaulting to `__default__` if you leave the database field blank. This 
change prevents ClickHouse from honoring the user's default database set at the 
server/user level, which is why your previous setup no longer works as 
expected. There is no flag or configuration to bypass this behavior—it's 
hardcoded in the ClickHouseConnectEngineSpec class 
([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/clickhouse.py#L310-L431)).
   
   To restore the old behavior, you would need to patch or subclass 
ClickHouseConnectEngineSpec to skip the `__default__` fallback when no database 
is specified. There is currently no built-in extension point or parameter for 
this, so a code change is required. If you need a workaround, you could 
maintain a fork or monkey-patch the engine spec in your deployment.
   
   Let me know if you want guidance on how to patch the code or if you have 
other constraints!
   
   
   <!-- 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/9d156c86-8bbc-4f65-a146-e630151ffab3?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/9d156c86-8bbc-4f65-a146-e630151ffab3?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/9d156c86-8bbc-4f65-a146-e630151ffab3?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/9d156c86-8bbc-4f65-a146-e630151ffab3?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/9d156c86-8bbc-4f65-a146-e630151ffab3?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/9d156c86-8bbc-4f65-a146-e630151ffab3?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/9d156c86-8bbc-4f65-a146-e630151ffab3?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Superset%20v6.x%20now%20forces%20a%20database%20value%20into%20the%20ClickHouse%20connection%20URI%2C%20defaulting%20to%20%60__default__%60%20if%20you%20leave%20the%20database%20field%20blank.%20This%20change%20prevents%20ClickHouse%20from%20honoring%20the%20user%27s%20default%20database%20set%20at%20the%20server/user%20level%2C%20which%20is%20why%20your%20previous%20setup%20no%20longer%20works%20as%20expected.%20There%20is%20no%20flag%20or%20configuration%20to%20bypass%20this%20behavior%E2%80%94it%27s%20hardcoded%20in%20the%20ClickHouseConnectEngineSpec%20class%20%28%5Bsource%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/clickhouse.py%23L310-L431%29%29.%0A%0ATo%20restore%20the%20ol
 
d%20behavior%2C%20you%20would%20need%20to%20patch%20or%20subclass%20ClickHouseConnectEngineSpec%20to%20skip%20the%20%60__default__%60%20fallback%20when%20no%20database%20is%20specified.%20There%20is%20currently%20no%20built-in%20extension%20point%20or%20parameter%20for%20this%2C%20so%20a%20code%20change%20is%20required.%20If%20you%20need%20a%20workaround%2C%20you%20could%20maintain%20a%20fork%20or%20monkey-patch%20the%20engine%20spec%20in%20your%20deployment.%0A%0ALet%20me%20know%20if%20you%20want%20guidance%20on%20how%20to%20patch%20the%20code%20or%20if%20you%20have%20other%20constraints%21)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/36683)


-- 
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]

Reply via email to