snowflake-rs
Snowflake API library.
Features
Since it does a lot of I/O the library is async-only, examples use tokio as a runtime.
- Single statements
- Multiple statements
- Query results in Arrow
- Password auth
- Certificate auth
- PUT support
- GET support
- AWS integration
- GCloud integration
- Azure integration
Why
Snowflake has 2 public APIs, one is SQL REST API, which is limited in its support of PUT and GET statements and another undocumented API, which is used by official Drivers with the support for both.
This implementation emulates gosnowflake library, as each official driver comes with a different set of internal flags and defaults (which are selected by CLIENT_APP_ID
) the Go implementation is the only one currently outputting Arrow by-default.
We've chosen not to generate bindings for C/C++ libsnowflakeclient library (which backs ODBC driver) as it is in active development and building it under macOS M1 is bigger effort than writing our own API wrapper.
Usage
In your Cargo.toml:
[]
= "0.1.0"
Check examples for working programs using the library.
use Result;
use ;
async
PUT / GET
PUT/GET statements allow you to access Snowflake-owned storage instead of provisioning your own when doing COPY INTO. Storage provider depends on which cloud your Snowflake account was provisioned in, hence the need to support multiple cloud backends.