airflow.providers.amazon.aws.triggers.glue_crawler

Module Contents

Classes

GlueCrawlerCompleteTrigger

Watches for a glue crawl, triggers when it finishes.

class airflow.providers.amazon.aws.triggers.glue_crawler.GlueCrawlerCompleteTrigger(crawler_name, poll_interval, aws_conn_id)[source]

Bases: airflow.triggers.base.BaseTrigger

Watches for a glue crawl, triggers when it finishes.

Parameters
  • crawler_name (str) – name of the crawler to watch

  • poll_interval (int) – The amount of time in seconds to wait between attempts.

  • aws_conn_id (str) – The Airflow connection used for AWS credentials.

serialize()[source]

Returns the information needed to reconstruct this Trigger.

Returns

Tuple of (class path, keyword arguments needed to re-instantiate).

Return type

tuple[str, dict]

hook()[source]
async run()[source]

Runs the trigger in an asynchronous context.

The trigger should yield an Event whenever it wants to fire off an event, and return None if it is finished. Single-event triggers should thus yield and then immediately return.

If it yields, it is likely that it will be resumed very quickly, but it may not be (e.g. if the workload is being moved to another triggerer process, or a multi-event trigger was being used for a single-event task defer).

In either case, Trigger classes should assume they will be persisted, and then rely on cleanup() being called when they are no longer needed.

Was this entry helpful?