-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support custom host and port, add streaming response support #54
Comments
I have a working fork here: https://github.com/quadratichq/snowflake-rs, though it still needs some polish. Sadly, hitting LocalStack Snowflake gave an empty body on the session login. After contacting LocalStack, it seems like their product is in public preview, and may be a paid feature in the future. My goal is to be able to test the snowflake interactions without hitting the production snowflake server. HTTP Mock is relatively new, which offers the ability to record live requests/responses into saved fixtures to use in tests. They require a custom host injection to act as a proxy, so the code in the fork may still be useful. I'll update this issue with my findings. |
In that same fork, I implemented a stream response. The original full response is available, but this stream helps avoid taking down a server for overly-large data sets. |
Note, for streaming support there is also the following PR available: The code has been battle tested for several months as part of the following project |
Thanks for creating this crate, it's a time saver! We needed a way to query Snowflake and convert to arrow/parquet, so this is perfect for us. There are some tweaks I would need in order to use this for tests. I'm happy to submit a PR, but wanted to see if you were accepting them?
Currently, the host is hard-coded to go snowflakecomputing.com. There is a way to test snowflake now on LocalStack, but it requires a custom host and port (host: snowflake.localhost.localstack.cloud, port: 4566).
I think this can be added to the builder without affecting the current API in lib.rs (just the signature to
request()
in connection.rs):Then, in the
request()
function in connection.rs:REFS:
Hard coding:
snowflake-rs/snowflake-api/src/connection.rs
Lines 147 to 149 in 57705c5
LocalStack on Snowflake docs: https://snowflake.localstack.cloud/introduction/
The text was updated successfully, but these errors were encountered: