airflow.providers.elasticsearch.hooks.elasticsearch

Module Contents

Classes

ElasticsearchHook

Interact with Elasticsearch through the elasticsearch-dbapi.

class airflow.providers.elasticsearch.hooks.elasticsearch.ElasticsearchHook(schema: str = 'http', connection: Optional[airflow.models.connection.Connection] = None, *args, **kwargs)[source]

Bases: airflow.hooks.dbapi.DbApiHook

Interact with Elasticsearch through the elasticsearch-dbapi.

This hook uses the Elasticsearch conn_id.

Parameters

elasticsearch_conn_id (str) -- The ElasticSearch connection id used for Elasticsearch credentials.

conn_name_attr = elasticsearch_conn_id[source]
default_conn_name = elasticsearch_default[source]
conn_type = elasticsearch[source]
hook_name = Elasticsearch[source]
get_conn(self) es.elastic.api.Connection[source]

Returns a elasticsearch connection object

get_uri(self) str[source]

Extract the URI from the connection.

Returns

the extracted uri.

Was this entry helpful?