astronomer.providers.amazon.aws.triggers.redshift_cluster
¶
Module Contents¶
Classes¶
RedshiftClusterTrigger is fired as deferred class with params to run the task in trigger worker |
|
RedshiftClusterSensorTrigger is fired as deferred class with params to run the task in trigger worker |
- class astronomer.providers.amazon.aws.triggers.redshift_cluster.RedshiftClusterTrigger(task_id, polling_period_seconds, aws_conn_id, cluster_identifier, operation_type)[source]¶
Bases:
airflow.triggers.base.BaseTrigger
RedshiftClusterTrigger is fired as deferred class with params to run the task in trigger worker
- Parameters:
task_id (str) – Reference to task id of the Dag
polling_period_seconds (float) – polling period in seconds to check for the status
aws_conn_id (str) – Reference to AWS connection id for redshift
cluster_identifier (str) – unique identifier of a cluster
operation_type (str) – Reference to the type of operation need to be performed eg: pause_cluster, resume_cluster
- async run(self)[source]¶
Make async connection to redshift, based on the operation type call the RedshiftHookAsync functions if operation_type is ‘resume_cluster’ it will call the resume_cluster function in RedshiftHookAsync if operation_type is ‘pause_cluster it will call the pause_cluster function in RedshiftHookAsync
- class astronomer.providers.amazon.aws.triggers.redshift_cluster.RedshiftClusterSensorTrigger(task_id, aws_conn_id, cluster_identifier, target_status, polling_period_seconds)[source]¶
Bases:
airflow.triggers.base.BaseTrigger
RedshiftClusterSensorTrigger is fired as deferred class with params to run the task in trigger worker
- Parameters:
task_id (str) – Reference to task id of the Dag
aws_conn_id (str) – Reference to AWS connection id for redshift
cluster_identifier (str) – unique identifier of a cluster
target_status (str) – Reference to the status which needs to be checked
polling_period_seconds (float) – polling period in seconds to check for the status