airflow.contrib.operators.snowflake_operator
¶
Module Contents¶
-
class
airflow.contrib.operators.snowflake_operator.
SnowflakeOperator
(sql, snowflake_conn_id='snowflake_default', parameters=None, autocommit=True, warehouse=None, database=None, role=None, schema=None, authenticator=None, *args, **kwargs)[source]¶ Bases:
airflow.models.BaseOperator
Executes sql code in a Snowflake database
- Parameters
snowflake_conn_id (str) – reference to specific snowflake connection id
sql (Can 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)
warehouse (str) – name of warehouse (will overwrite any warehouse defined in the connection’s extra JSON)
database (str) – name of database (will overwrite database defined in connection)
schema (str) – name of schema (will overwrite schema defined in connection)
role – name of role (will overwrite any role defined in connection’s extra JSON)
authenticator (str) – authenticator 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://<your_okta_account_name>.okta.com’ to authenticate through native Okta.