astronomer.providers.amazon.aws.triggers.redshift_data

Module Contents

Classes

RedshiftDataTrigger

RedshiftDataTrigger is fired as deferred class with params to run the task in triggerer.

class astronomer.providers.amazon.aws.triggers.redshift_data.RedshiftDataTrigger(task_id, poll_interval, query_ids, aws_conn_id='aws_default')[source]

Bases: airflow.triggers.base.BaseTrigger

RedshiftDataTrigger is fired as deferred class with params to run the task in triggerer.

Parameters:
  • task_id (str) – task ID of the Dag

  • poll_interval (int) – polling period in seconds to check for the status

  • aws_conn_id (str) – AWS connection ID for redshift

  • query_ids (List[str]) – list of query IDs to run and poll for the status

serialize()[source]

Serializes RedshiftDataTrigger arguments and classpath.

async run()[source]

Makes async connection and gets status for a list of queries submitted by the operator. Even if one of the queries has a non-successful state, the hook returns a failure event and the error is sent back to the operator.