blob: cd5bc151bde12bcdba32fb879c5e314afdc9bfb2 [file] [log] [blame]
:py:mod:`airflow.providers.amazon.aws.sensors.athena`
=====================================================
.. py:module:: airflow.providers.amazon.aws.sensors.athena
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
airflow.providers.amazon.aws.sensors.athena.AthenaSensor
.. py:class:: AthenaSensor(*, query_execution_id, max_retries = None, aws_conn_id = 'aws_default', sleep_time = 10, **kwargs)
Bases: :py:obj:`airflow.sensors.base.BaseSensorOperator`
Asks for the state of the Query until it reaches a failure state or success state.
If the query fails, the task will fail.
.. seealso::
For more information on how to use this sensor, take a look at the guide:
:ref:`howto/sensor:AthenaSensor`
:param query_execution_id: query_execution_id to check the state of
:param max_retries: Number of times to poll for query state before
returning the current state, defaults to None
:param aws_conn_id: aws connection to use, defaults to 'aws_default'
:param sleep_time: Time in seconds to wait between two consecutive call to
check query status on athena, defaults to 10
.. py:attribute:: INTERMEDIATE_STATES
:annotation: = ['QUEUED', 'RUNNING']
.. py:attribute:: FAILURE_STATES
:annotation: = ['FAILED', 'CANCELLED']
.. py:attribute:: SUCCESS_STATES
:annotation: = ['SUCCEEDED']
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['query_execution_id']
.. py:attribute:: template_ext
:annotation: :Sequence[str] = []
.. py:attribute:: ui_color
:annotation: = #66c3ff
.. py:method:: poke(self, context)
Function that the sensors defined while deriving this class should
override.
.. py:method:: hook(self)
Create and return an AthenaHook