Clickhouse Drop In server in RUST that proxies requests to Snowflake (experimental atm)
Complete with some samples using Golang (Go) and the Clickhouse Golang driver.
TLS support can be added by putting a TCP TLS reverse proxy in of this driver such as stunnel.
For now if you want to run the samples and test out the proxy server just update the docker-compose file with your own credentials for Snowflake, then run docker compose up and test the Go samples again the proxies.
If you want to use a private key instead of password, use the following string for the password your Clickhouse client: -----BEGIN PRIVATE KEY-----
and set the environment variable SNOWFLAKE_KEY_PASS to the contents of our private key.
In the next release I will make sure that we have auto-detection of private keys in place for the Clickhouse client password field, to make this a bit easier.
You can also build the proxy yourself by following these steps:
-
Install RUST
-
Install Go(lang)
-
git clone https://github.com/KellerKev/clickhouse-native-snowflake-proxy.git
-
cd clickhouse-native-snowflake-proxy
-
Change the Snowflake credentials in main.rs to your own.
-
cargo build --release
-
./target/release/clickhouse_native_snowflake_proxy
-
cd go-client-samples
-
go run (pick one of the samples)
The Go samples program will execute queries using the Clickhouse Go driver (SELECTS, INSERTS) which will be actually executed in your Snowflake account and results send back to the Clickhouse proxy.