:mod:`airflow.contrib.operators.snowflake_operator` =================================================== .. py:module:: airflow.contrib.operators.snowflake_operator Module Contents --------------- .. py:class:: SnowflakeOperator(sql, snowflake_conn_id='snowflake_default', parameters=None, autocommit=True, warehouse=None, database=None, role=None, schema=None, *args, **kwargs) Bases: :class:`airflow.models.BaseOperator` Executes sql code in a Snowflake database :param snowflake_conn_id: reference to specific snowflake connection id :type snowflake_conn_id: str :param sql: the sql code to be executed. (templated) :type 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' :param warehouse: name of warehouse (will overwrite any warehouse defined in the connection's extra JSON) :type warehouse: str :param database: name of database (will overwrite database defined in connection) :type database: str :param schema: name of schema (will overwrite schema defined in connection) :type schema: str :param role: name of role (will overwrite any role defined in connection's extra JSON) .. attribute:: template_fields :annotation: = ['sql'] .. attribute:: template_ext :annotation: = ['.sql'] .. attribute:: ui_color :annotation: = #ededed .. method:: get_hook(self) .. method:: execute(self, context)