| :py:mod:`airflow.providers.amazon.aws.operators.athena` |
| ======================================================= |
| |
| .. py:module:: airflow.providers.amazon.aws.operators.athena |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.amazon.aws.operators.athena.AthenaOperator |
| airflow.providers.amazon.aws.operators.athena.AWSAthenaOperator |
| |
| |
| |
| |
| .. py:class:: AthenaOperator(*, query, database, output_location, aws_conn_id = 'aws_default', client_request_token = None, workgroup = 'primary', query_execution_context = None, result_configuration = None, sleep_time = 30, max_tries = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| An operator that submits a presto query to athena. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:AthenaOperator` |
| |
| :param query: Presto to be run on athena. (templated) |
| :param database: Database to select. (templated) |
| :param output_location: s3 path to write the query results into. (templated) |
| :param aws_conn_id: aws connection to use |
| :param client_request_token: Unique token created by user to avoid multiple executions of same query |
| :param workgroup: Athena workgroup in which query will be run |
| :param query_execution_context: Context in which query need to be run |
| :param result_configuration: Dict with path to store results in and config related to encryption |
| :param sleep_time: Time (in seconds) to wait between two consecutive calls to check query status on Athena |
| :param max_tries: Number of times to poll for query state before function exits |
| |
| .. py:attribute:: ui_color |
| :annotation: = #44b5e2 |
| |
| |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['query', 'database', 'output_location'] |
| |
| |
| |
| .. py:attribute:: template_ext |
| :annotation: :Sequence[str] = ['.sql'] |
| |
| |
| |
| .. py:attribute:: template_fields_renderers |
| |
| |
| |
| |
| .. py:method:: hook(self) |
| |
| Create and return an AthenaHook. |
| |
| |
| .. py:method:: execute(self, context) |
| |
| Run Presto Query on Athena |
| |
| |
| .. py:method:: on_kill(self) |
| |
| Cancel the submitted athena query |
| |
| |
| |
| .. py:class:: AWSAthenaOperator(*args, **kwargs) |
| |
| Bases: :py:obj:`AthenaOperator` |
| |
| This operator is deprecated. |
| Please use :class:`airflow.providers.amazon.aws.operators.athena.AthenaOperator`. |
| |
| |