clickhouse-connect icon indicating copy to clipboard operation
clickhouse-connect copied to clipboard

Support for clickhouse cluster in superset - alt_hosts

Open royxact opened this issue 1 year ago • 4 comments

Can you please add support for alt_hosts in the superset connection string?

Thanks

royxact avatar Jan 06 '25 09:01 royxact

What does that mean? The clickhouse clients don't have support for falling back to other hosts.

genzgd avatar Jan 06 '25 10:01 genzgd

Hi @genzgd ! It's a parameter found in the clickhouse python driver https://clickhouse-driver.readthedocs.io/en/latest/api.html Also the go driver has it. So I thought it makes sense to support it here as well. Thanks

royxact avatar Jan 06 '25 10:01 royxact

Ah, I understand. Just to clarify, this works in superset with clickhouse-driver?

In any case, I think that makes this a duplicate of #74?

genzgd avatar Jan 06 '25 12:01 genzgd

Correct, seems a similar requirement. With alt_hosts behavior, you try the host, and if it doesn't respond you go the alternative. So it's more of a fail over rather than a load balancer.

On Mon, Jan 6, 2025, 14:36 Geoff Genz @.***> wrote:

Ah, I understand. Just to clarify, this works in superset with clickhouse-driver?

In any case, I think that makes this a duplicate of #74 https://github.com/ClickHouse/clickhouse-connect/issues/74?

— Reply to this email directly, view it on GitHub https://github.com/ClickHouse/clickhouse-connect/issues/447#issuecomment-2573025621, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACS2WLAKSSP3RAEET3UWEDD2JJ2D3AVCNFSM6AAAAABUVGK7FKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNZTGAZDKNRSGE . You are receiving this because you authored the thread.Message ID: @.***>

royxact avatar Jan 06 '25 13:01 royxact

I can confirm that this functionality works in Superset using the ClickHouse driver, configured with the following connection string: clickhouse+native://CH_USER:CH_PASSWORD@CH_HOST:9000/CH_DB?alt_hosts=CH_ALT_HOST:9000

However, we need to use ClickHouse Connect for other reasons, so it would be great if you could support this feature.

EinavDanielDX avatar Jun 01 '25 09:06 EinavDanielDX

@EinavDanielDX tells about reasons. Why do you need to use ClickHouse Connect? What are benefits?

vanu-k avatar Oct 01 '25 07:10 vanu-k