airflow.providers.amazon.aws.hooks.athena_sql

Module Contents

Classes

AthenaSQLHook

Interact with Amazon Athena.

class airflow.providers.amazon.aws.hooks.athena_sql.AthenaSQLHook(athena_conn_id=default_conn_name, *args, **kwargs)[source]

Bases: airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook, airflow.providers.common.sql.hooks.sql.DbApiHook

Interact with Amazon Athena.

Provide wrapper around PyAthena library.

Parameters

athena_conn_id (str) – Amazon Athena Connection.

Additional arguments (such as aws_conn_id) may be specified and are passed down to the underlying AwsBaseHook.

You can specify driver in extra of your connection in order to use a different driver than the default rest.

Also, aws_domain could be specified in extra of your connection.

PyAthena and AWS Authentication parameters could be passed in extra field of athena_conn_id connection.

Passing authentication parameters in athena_conn_id will override those in aws_conn_id.

See also

AwsBaseHook

Note

get_uri() depends on SQLAlchemy and PyAthena.

property conn: airflow.providers.amazon.aws.utils.connection_wrapper.AwsConnectionWrapper[source]

Get Aws Connection Wrapper object.

conn_name_attr = 'athena_conn_id'[source]
default_conn_name = 'athena_default'[source]
conn_type = 'athena'[source]
hook_name = 'Amazon Athena'[source]
supports_autocommit = True[source]
classmethod get_ui_field_behaviour()[source]

Return custom UI field behaviour for AWS Athena Connection.

conn_config()[source]

Get the Airflow Connection object and wrap it in helper (cached).

get_uri()[source]

Overridden to use the Athena dialect as driver name.

get_conn()[source]

Get a pyathena.Connection object.

Was this entry helpful?