Asks for the state of the Query until it reaches a failure state or success state.
- class airflow.providers.amazon.aws.sensors.athena.AthenaSensor(*, query_execution_id, max_retries=None, aws_conn_id='aws_default', sleep_time=10, **kwargs)¶
Asks for the state of the Query until it reaches a failure state or success state. If the query fails, the task will fail.
For more information on how to use this sensor, take a look at the guide: Wait on Amazon Athena query results
query_execution_id (str) – query_execution_id to check the state of
max_retries (int | None) – 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 in seconds to wait between two consecutive call to check query status on athena, defaults to 10
- INTERMEDIATE_STATES = ['QUEUED', 'RUNNING']¶
- FAILURE_STATES = ['FAILED', 'CANCELLED']¶
- SUCCESS_STATES = ['SUCCEEDED']¶
- template_fields :Sequence[str] = ['query_execution_id']¶
- template_ext :Sequence[str] = ¶
- ui_color = #66c3ff¶
Function defined by the sensors while deriving this class should override.
Create and return an AthenaHook