airflow.providers.elasticsearch.hooks.elasticsearch
¶
Module Contents¶
Classes¶
wrapper class for elasticsearch.Elasticsearch. |
|
Interact with Elasticsearch through the elasticsearch-dbapi. |
|
This class is deprecated and was renamed to ElasticsearchSQLHook. |
|
Interacts with Elasticsearch. This hook uses the official Elasticsearch Python Client. |
Functions¶
|
- airflow.providers.elasticsearch.hooks.elasticsearch.connect(host='localhost', port=9200, user=None, password=None, scheme='http', **kwargs)[source]¶
- class airflow.providers.elasticsearch.hooks.elasticsearch.ESConnection(host='localhost', port=9200, user=None, password=None, scheme='http', **kwargs)[source]¶
wrapper class for elasticsearch.Elasticsearch.
- class airflow.providers.elasticsearch.hooks.elasticsearch.ElasticsearchSQLHook(schema='http', connection=None, *args, **kwargs)[source]¶
Bases:
airflow.providers.common.sql.hooks.sql.DbApiHook
Interact with Elasticsearch through the elasticsearch-dbapi.
This hook uses the Elasticsearch conn_id.
- Parameters
elasticsearch_conn_id – The ElasticSearch connection id used for Elasticsearch credentials.
- class airflow.providers.elasticsearch.hooks.elasticsearch.ElasticsearchHook(*args, **kwargs)[source]¶
Bases:
ElasticsearchSQLHook
This class is deprecated and was renamed to ElasticsearchSQLHook.
Please use
airflow.providers.elasticsearch.hooks.elasticsearch.ElasticsearchSQLHook
.
- class airflow.providers.elasticsearch.hooks.elasticsearch.ElasticsearchPythonHook(hosts, es_conn_args=None)[source]¶
Bases:
airflow.hooks.base.BaseHook
Interacts with Elasticsearch. This hook uses the official Elasticsearch Python Client.
- Parameters
hosts (list[Any]) – list: A list of a single or many Elasticsearch instances. Example: [“http://localhost:9200”]
es_conn_args (dict | None) – dict: Additional arguments you might need to enter to connect to Elasticsearch. Example: {“ca_cert”:”/path/to/cert”, “basic_auth”: “(user, pass)”}