SnowflakeSqlApiHookAsync

Astronomer Providers

A client to interact with Snowflake using SQL API and allows submitting multiple SQL statements in a single request. In combination with aiohttp, make post request to submit SQL statements for execution, poll to check the status of the execution of a statement. Fetch query results asynchronously.

Access Instructions

Install the Astronomer Providers provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

snowflake_conn_idReference to Snowflake connection id
accountsnowflake account name
authenticatorauthenticator for Snowflake. ‘snowflake’ (default) to use the internal Snowflake authenticator ‘externalbrowser’ to authenticate using your web browser and Okta, ADFS or any other SAML 2.0-compliant identify provider (IdP) that has been defined for your account ‘https://.okta.com’ to authenticate through native Okta.
warehousename of snowflake warehouse
databasename of snowflake database
regionname of snowflake region
rolename of snowflake role
schemaname of snowflake schema
session_parametersYou can set session-level parameters at the time you connect to Snowflake
token_life_timelifetime of the JWT Token in timedelta
token_renewal_deltaRenewal time of the JWT Token in timedelta

Documentation

A client to interact with Snowflake using SQL API and allows submitting multiple SQL statements in a single request. In combination with aiohttp, make post request to submit SQL statements for execution, poll to check the status of the execution of a statement. Fetch query results asynchronously.

This hook requires the snowflake_conn_id connection. This hooks mainly uses account, schema, database, warehouse, private_key_file or private_key_content field must be setup in the connection. Other inputs can be defined in the connection or hook instantiation.

Was this page helpful?