| :py:mod:`airflow.providers.amazon.aws.operators.redshift_sql` |
| ============================================================= |
| |
| .. py:module:: airflow.providers.amazon.aws.operators.redshift_sql |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.amazon.aws.operators.redshift_sql.RedshiftSQLOperator |
| |
| |
| |
| |
| .. py:class:: RedshiftSQLOperator(*, sql, redshift_conn_id = 'redshift_default', parameters = None, autocommit = True, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Executes SQL Statements against an Amazon Redshift cluster |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:RedshiftSQLOperator` |
| |
| :param sql: the SQL code to be executed as a single string, or |
| a list of str (sql statements), or a reference to a template file. |
| Template references are recognized by str ending in '.sql' |
| :param redshift_conn_id: reference to |
| :ref:`Amazon Redshift connection id<howto/connection:redshift>` |
| :param parameters: (optional) the parameters to render the SQL query with. |
| :param autocommit: if True, each command is automatically committed. |
| (default value: False) |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['sql'] |
| |
| |
| |
| .. py:attribute:: template_ext |
| :annotation: :Sequence[str] = ['.sql'] |
| |
| |
| |
| .. py:attribute:: template_fields_renderers |
| |
| |
| |
| |
| .. py:method:: get_hook(self) |
| |
| Create and return RedshiftSQLHook. |
| :return RedshiftSQLHook: A RedshiftSQLHook instance. |
| |
| |
| .. py:method:: execute(self, context) |
| |
| Execute a statement against Amazon Redshift |
| |
| |
| |