An operator that submits a presto query to athena.

View Source

Last Updated: Apr. 2, 2021

Access Instructions

Install the Amazon provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.


querystrPresto to be run on athena. (templated)
databasestrDatabase to select. (templated)
output_locationstrs3 path to write the query results into. (templated)
aws_conn_idstraws connection to use
client_request_tokenstrUnique token created by user to avoid multiple executions of same query
workgroupstrAthena workgroup in which query will be run
query_execution_contextdictContext in which query need to be run
result_configurationdictDict with path to store results in and config related to encryption
sleep_timeintTime (in seconds) to wait between two consecutive calls to check query status on Athena
max_triesintNumber of times to poll for query state before function exits


An operator that submits a presto query to athena.

Example DAGs

Improve this module by creating an example DAG.

View Source
  1. Add an `example_dags` directory to the top-level source of the provider package with an empty `` file.
  2. Add your DAG to this directory. Be sure to include a well-written and descriptive docstring
  3. Create a pull request against the source code. Once the package gets released, your DAG will show up on the Registry.

Was this page helpful?