blob: 3e2f34341f0f3e2d33f9a7a84340dff8cdda050f [file] [log] [blame]
: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, *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 which overwrite defined
one in connection
:type warehouse: str
:param database: name of database which overwrite defined one in connection
:type database: str
.. attribute:: template_fields
:annotation: = ['sql']
.. attribute:: template_ext
:annotation: = ['.sql']
.. attribute:: ui_color
:annotation: = #ededed
.. method:: get_hook(self)
.. method:: execute(self, context)