blob: d999052e5f7138b4886b242e32ca354c6afa59ee [file] [log] [blame]
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Amazon Redshift Operators
=========================
`Amazon Redshift <https://aws.amazon.com/redshift/>`__ manages all the work of setting up, operating, and scaling a data warehouse:
provisioning capacity, monitoring and backing up the cluster, and applying patches and upgrades to
the Amazon Redshift engine. You can focus on using your data to acquire new insights for your
business and customers.
Airflow provides operators to manage your Redshift clusters.
Prerequisite Tasks
^^^^^^^^^^^^^^^^^^
.. include:: _partials/prerequisite_tasks.rst
Manage Amazon Redshift Clusters
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. _howto/operator:RedshiftCreateClusterOperator:
Amazon Redshift Cluster Operator
""""""""""""""""""""""""""""""""
To create an Amazon Redshift Cluster with the specified parameters
:class:`~airflow.providers.amazon.aws.operators.redshift_cluster.RedshiftCreateClusterOperator`.
.. exampleinclude:: /../../airflow/providers/amazon/aws/example_dags/example_redshift_cluster.py
:language: python
:dedent: 4
:start-after: [START howto_operator_redshift_cluster]
:end-before: [END howto_operator_redshift_cluster]
.. _howto/sensor:RedshiftClusterSensor:
Amazon Redshift Cluster Sensor
""""""""""""""""""""""""""""""
To check the state of an Amazon Redshift Cluster until it reaches the target state or another terminal
state you can use :class:`~airflow.providers.amazon.aws.sensors.redshift_cluster.RedshiftClusterSensor`.
.. exampleinclude:: /../../airflow/providers/amazon/aws/example_dags/example_redshift_cluster.py
:language: python
:dedent: 4
:start-after: [START howto_sensor_redshift_cluster]
:end-before: [END howto_sensor_redshift_cluster]
.. _howto/operator:RedshiftResumeClusterOperator:
Resume an Amazon Redshift Cluster
"""""""""""""""""""""""""""""""""
To resume a 'paused' Amazon Redshift Cluster you can use
:class:`RedshiftResumeClusterOperator <airflow.providers.amazon.aws.operators.redshift_cluster>`
.. exampleinclude:: /../../airflow/providers/amazon/aws/example_dags/example_redshift_cluster.py
:language: python
:dedent: 4
:start-after: [START howto_operator_redshift_resume_cluster]
:end-before: [END howto_operator_redshift_resume_cluster]
.. _howto/operator:RedshiftPauseClusterOperator:
Pause an Amazon Redshift Cluster
""""""""""""""""""""""""""""""""
To pause an 'available' Amazon Redshift Cluster you can use
:class:`RedshiftPauseClusterOperator <airflow.providers.amazon.aws.operators.redshift_cluster>`
.. exampleinclude:: /../../airflow/providers/amazon/aws/example_dags/example_redshift_cluster.py
:language: python
:dedent: 4
:start-after: [START howto_operator_redshift_pause_cluster]
:end-before: [END howto_operator_redshift_pause_cluster]
.. _howto/operator:RedshiftDeleteClusterOperator:
Delete an Amazon Redshift Cluster
"""""""""""""""""""""""""""""""""
To delete an Amazon Redshift Cluster you can use
:class:`RedshiftDeleteClusterOperator <airflow.providers.amazon.aws.operators.redshift_cluster>`
.. exampleinclude:: /../../airflow/providers/amazon/aws/example_dags/example_redshift_cluster.py
:language: python
:dedent: 4
:start-after: [START howto_operator_redshift_delete_cluster]
:end-before: [END howto_operator_redshift_delete_cluster]
Reference
^^^^^^^^^
* `AWS boto3 Library Documentation for Amazon Redshift <https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/redshift.html>`__