Executes SQL code in a Snowflake database

View on GitHub

Last Updated: Sep. 9, 2021

Access Instructions

Install the Snowflake provider package into your Airflow environment.

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


snowflake_conn_idstrReference to Snowflake connection id
sqlRequiredCan receive a str representing a sql statement, a list of str (sql statements), or reference to a template file. Template reference are recognized by str ending in ‘.sql’the sql code to be executed. (templated)
autocommitboolif True, each command is automatically committed. (default value: True)
parametersdict or iterable(optional) the parameters to render the SQL query with.
warehousestrname of warehouse (will overwrite any warehouse defined in the connection’s extra JSON)
databasestrname of database (will overwrite database defined in connection)
schemastrname of schema (will overwrite schema defined in connection)
rolestrname of role (will overwrite any role defined in connection’s extra JSON)
authenticatorstrauthenticator 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 ‘’ to authenticate through native Okta.
session_parametersdictYou can set session-level parameters at the time you connect to Snowflake


Executes SQL code in a Snowflake database

See also

For more information on how to use this operator, take a look at the guide: SnowflakeOperator

Was this page helpful?