airflow.contrib.operators.aws_athena_operator

Module Contents

class airflow.contrib.operators.aws_athena_operator.AWSAthenaOperator(query, database, output_location, aws_conn_id='aws_default', client_request_token=None, query_execution_context=None, result_configuration=None, sleep_time=30, *args, **kwargs)[source]

Bases:airflow.models.BaseOperator

An operator that submit presto query to athena.

Parameters
  • query (str) – Presto to be run on athena. (templated)

  • database (str) – Database to select. (templated)

  • output_location (str) – s3 path to write the query results into. (templated)

  • aws_conn_id (str) – aws connection to use

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

ui_color = #44b5e2[source]
template_fields = ['query', 'database', 'output_location'][source]
get_hook(self)[source]
execute(self, context)[source]

Run Presto Query on Athena

on_kill(self)[source]

Cancel the submitted athena query