Snowflake Connector
With this connector, Hasura allows you to instantly create a real-time GraphQL API on top of your data models in Snowflake. This connector supports Snowflake's functionalities listed in the table below, allowing for efficient and scalable data operations. Additionally, users benefit from all the powerful features of Hasura’s Data Delivery Network (DDN) platform, including query pushdown capabilities that delegate query operations to the database, thereby enhancing query optimization and performance.
This connector implements the Data Connector Spec.
Features
Below, you'll find a matrix of all supported features for the Snowflake connector:
Feature | Supported | Notes |
---|---|---|
Native Queries + Logical Models | ✅ | |
Native Mutations | ❌ | |
Simple Object Query | ✅ | |
Filter / Search | ✅ | |
Simple Aggregation | ✅ | |
Sort | ✅ | |
Paginate | ✅ | |
Table Relationships | ✅ | |
Views | ✅ | |
Remote Relationships | ✅ | |
Custom Fields | ❌ | |
Mutations | ❌ | |
Distinct | ❌ | |
Enums | ❌ | |
Naming Conventions | ❌ | |
Default Values | ❌ | |
User-defined Functions | ❌ |
Prerequisites
- Create a Hasura Cloud account
- Please ensure you have the DDN CLI and Docker installed
- Create a supergraph
- Create a subgraph
The steps below explain how to initialize and configure a connector on your local machine (typically for development purposes).You can learn how to deploy a connector to Hasura DDN — after it's been configured — here.
Using the Snowflake connector
With the context set for an existing subgraph, initialize the connector:
ddn connector init -i
When the wizard runs, you'll be prompted to enter the following env vars necessary for your connector to function:
Name | Description | Required |
---|---|---|
JDBC_URL | The JDBC URL to connect to the database | Yes |
JDBC_SCHEMAS | A comma-separated list of schemas to include in the metadata | Yes |
After the CLI initializes the connector, you'll need to:
- Introspect the source.
- Add your models, commands, and relationships.
- Create a new build.
- Test it by running your project along with the connector.
Key-Pair Authentication with RSA Keys
Snowflake supports Key-Pair Authentication in their JDBC driver, as noted in the docs:
This connector supports the method described in section
Private key file name and password in connection string
Namely, mount your RSA keys into the Connector container, and then reference the mounted file path in your connection string as below:
jdbc:snowflake://xxx.us-east-2.aws.snowflakecomputing.com/?private_key_file=/etc/connector/rsa_key.p8&private_key_file_pwd=<PASSWORD>
License
The Hasura Snowflake connector is available under the Apache License 2.0.