Snowflake - Execute Query
Overview
Execute a query against Snowflake, without returning any of the resulting data. This Blueprint should primarily be used for queries that perform functionality other than SELECT, like multi-step SQL jobs, or DML statements. This Blueprint is limited to executing a single query. You cannot run multiple queries separated by `;` (this is prohibited by the Snowflake Python connector). Instead, you'll have to set up multiple Vessels with this Blueprint to run one after the other.
Variables
Name | Reference | Type | Required | Default | Options | Description |
---|---|---|---|---|---|---|
Username | SNOWFLAKE_USERNAME | Alphanumeric | ✅ | None | - | The Snowflake Username that has access to the table, schema, and warehouse that you want to use. |
Password | SNOWFLAKE_PASSWORD | Password | ➖ | None | - | The password associated with your Username. |
Account Name | SNOWFLAKE_ACCOUNT | Alphanumeric | ✅ | None | - | Typically found in the URL you use to access Snowflake, before `.snowflakecomputing.com` |
Warehouse | SNOWFLAKE_WAREHOUSE | Alphanumeric | ➖ | None | - | If left blank, will use the default warehouse associated with the provided username. |
Database | SNOWFLAKE_DATABASE | Alphanumeric | ✅ | None | - | The name of the Database that you want to run a query against. |
Schema | SNOWFLAKE_SCHEMA | Alphanumeric | ➖ | None | - | The name of the Schema you want to run a query against. If left blank, it's expected that your query will include the schema in it. |
Query | SNOWFLAKE_QUERY | Alphanumeric | ✅ | None | - | The contents of the SQL query that you want to run. Does not support running multiple queries separated by `;` |
User Role | SNOWFLAKE_USER_ROLE | Alphanumeric | ➖ | - | - | The optional role for the database user |
Private Key | SNOWFLAKE_PRIVATE_KEY | Alphanumeric | ➖ | - | - | The optional private key to use for authentication |
Private Key Passphrase | SNOWFLAKE_PRIVATE_KEY_PASSPHRASE | Password | ➖ | - | - | The passphrase for the private key file. Is required only if authenticating with a private key |
YAML
Below is the YAML template
source:
template: Snowflake - Execute Query
inputs:
SNOWFLAKE_USERNAME:
SNOWFLAKE_PASSWORD:
SNOWFLAKE_ACCOUNT:
SNOWFLAKE_WAREHOUSE:
SNOWFLAKE_DATABASE:
SNOWFLAKE_SCHEMA:
SNOWFLAKE_QUERY:
SNOWFLAKE_USER_ROLE:
SNOWFLAKE_PRIVATE_KEY:
SNOWFLAKE_PRIVATE_KEY_PASSPHRASE:
type: TEMPLATE
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 200
- 201
- 202
- 203
- 204
- 205
- 206
- 207
- 208
- 209
- 249