SnowflakeConnector
Sends requests to a specific GNN engine for processing tasks.
Parameters
Section titled “Parameters”| Name | Type | Description | Optional |
|---|---|---|---|
account | str | Snowflake account identifier. Required for password, key_pair and oauth auth_methods. | Yes |
warehouse | str | Snowflake warehouse. Required for password, key_pair, browser and oauth auth_methods. | Yes |
app_name | str | Snowflake Native App name. | No |
user | str | Snowflake username. Required for password and key_pair auth_methods. | Yes |
role | str | Snowflake role. Ensure this role has read permissions for input databases/schemas and write permissions for storing generated predictions. | No |
auth_method | str | Authentication method (password, key_pair, browser, oauth, or active_session). Use active_session when executing inside a Snowflake notebook. When using active_session, account, warehouse, user and role do not need to be set. Defaults to password. | No |
password | str | Snowflake password (required if auth_method is password) | Yes |
private_key_path | str | Path to private key file (required if auth_method is key_pair). | Yes |
private_key_passphrase | str | Optional passphrase for encrypted private key. | Yes |
oauth_token | str | OAuth access token (required if auth_method is oauth) | Yes |
host | str | Optional Snowflake host for OAuth authentication. | Yes |
engine_name | str | Name of the GNN engine to send requests to | No |
Returns
Section titled “Returns”An instance of the SnowflakeConnector class.
Example
Section titled “Example”All authentication methods available in the Provider examples can be used in the SnowflakeConnector too. In this example, we demonstrate password authentication. A convenient approach is to define a snowflake_config dictionary with your preferred method and pass it to both Provider and SnowflakeConnector.
from relationalai_gnns import SnowflakeConnector
snowflake_config = { "account": "<SNOWFLAKE_ACCOUNT>", "user": "<SNOWFLAKE_USER>", "password": "<SNOWFLAKE_PASSWORD>", "role":"<SNOWFLAKE_ROLE_WITH_ACCESS_TO_DB>", "warehouse": "<SNOWFLAKE_WAREHOUSE>", "app_name": "RELATIONALAI", "auth_method": "password"}
connector = SnowflakeConnector( **snowflake_config, engine_name = "engine_name")