| :mod:`airflow.contrib.hooks.redshift_hook` |
| ========================================== |
| |
| .. py:module:: airflow.contrib.hooks.redshift_hook |
| |
| |
| Module Contents |
| --------------- |
| |
| .. py:class:: RedshiftHook |
| |
| Bases: :class:`airflow.contrib.hooks.aws_hook.AwsHook` |
| |
| Interact with AWS Redshift, using the boto3 library |
| |
| |
| .. method:: get_conn(self) |
| |
| |
| |
| |
| .. method:: cluster_status(self, cluster_identifier) |
| |
| Return status of a cluster |
| |
| :param cluster_identifier: unique identifier of a cluster |
| :type cluster_identifier: str |
| |
| |
| |
| |
| .. method:: delete_cluster(self, cluster_identifier, skip_final_cluster_snapshot=True, final_cluster_snapshot_identifier='') |
| |
| Delete a cluster and optionally create a snapshot |
| |
| :param cluster_identifier: unique identifier of a cluster |
| :type cluster_identifier: str |
| :param skip_final_cluster_snapshot: determines cluster snapshot creation |
| :type skip_final_cluster_snapshot: bool |
| :param final_cluster_snapshot_identifier: name of final cluster snapshot |
| :type final_cluster_snapshot_identifier: str |
| |
| |
| |
| |
| .. method:: describe_cluster_snapshots(self, cluster_identifier) |
| |
| Gets a list of snapshots for a cluster |
| |
| :param cluster_identifier: unique identifier of a cluster |
| :type cluster_identifier: str |
| |
| |
| |
| |
| .. method:: restore_from_cluster_snapshot(self, cluster_identifier, snapshot_identifier) |
| |
| Restores a cluster from its snapshot |
| |
| :param cluster_identifier: unique identifier of a cluster |
| :type cluster_identifier: str |
| :param snapshot_identifier: unique identifier for a snapshot of a cluster |
| :type snapshot_identifier: str |
| |
| |
| |
| |
| .. method:: create_cluster_snapshot(self, snapshot_identifier, cluster_identifier) |
| |
| Creates a snapshot of a cluster |
| |
| :param snapshot_identifier: unique identifier for a snapshot of a cluster |
| :type snapshot_identifier: str |
| :param cluster_identifier: unique identifier of a cluster |
| :type cluster_identifier: str |
| |
| |
| |
| |