airflow.contrib.sensors.aws_athena_sensor

Module Contents

class airflow.contrib.sensors.aws_athena_sensor.AthenaSensor(query_execution_id, max_retires=None, aws_conn_id='aws_default', sleep_time=10, *args, **kwargs)[source]

Bases: airflow.sensors.base_sensor_operator.BaseSensorOperator

Asks for the state of the Query until it reaches a failure state or success state. If it fails, failing the task.

Parameters
  • query_execution_id (str) – query_execution_id to check the state of

  • max_retires (int) – Number of times to poll for query state before returning the current state, defaults to None

  • aws_conn_id (str) – aws connection to use, defaults to ‘aws_default’

  • sleep_time (int) – Time to wait between two consecutive call to check query status on athena, defaults to 10

INTERMEDIATE_STATES = ['QUEUED', 'RUNNING'][source]
FAILURE_STATES = ['FAILED', 'CANCELLED'][source]
SUCCESS_STATES = ['SUCCEEDED'][source]
template_fields = ['query_execution_id'][source]
template_ext = [][source]
ui_color = #66c3ff[source]
poke(self, context)[source]
get_hook(self)[source]