apache-airflow-providers-elasticsearch 5.5.0__py3-none-any.whl → 5.5.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of apache-airflow-providers-elasticsearch might be problematic. Click here for more details.
- airflow/providers/elasticsearch/__init__.py +1 -1
- airflow/providers/elasticsearch/get_provider_info.py +3 -2
- airflow/providers/elasticsearch/hooks/elasticsearch.py +4 -8
- airflow/providers/elasticsearch/log/es_task_handler.py +2 -2
- {apache_airflow_providers_elasticsearch-5.5.0.dist-info → apache_airflow_providers_elasticsearch-5.5.1.dist-info}/METADATA +8 -8
- apache_airflow_providers_elasticsearch-5.5.1.dist-info/RECORD +13 -0
- apache_airflow_providers_elasticsearch-5.5.0.dist-info/RECORD +0 -13
- {apache_airflow_providers_elasticsearch-5.5.0.dist-info → apache_airflow_providers_elasticsearch-5.5.1.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_elasticsearch-5.5.0.dist-info → apache_airflow_providers_elasticsearch-5.5.1.dist-info}/entry_points.txt +0 -0
|
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
|
29
29
|
|
|
30
30
|
__all__ = ["__version__"]
|
|
31
31
|
|
|
32
|
-
__version__ = "5.5.
|
|
32
|
+
__version__ = "5.5.1"
|
|
33
33
|
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
|
35
35
|
"2.8.0"
|
|
@@ -28,8 +28,9 @@ def get_provider_info():
|
|
|
28
28
|
"name": "Elasticsearch",
|
|
29
29
|
"description": "`Elasticsearch <https://www.elastic.co/elasticsearch>`__\n",
|
|
30
30
|
"state": "ready",
|
|
31
|
-
"source-date-epoch":
|
|
31
|
+
"source-date-epoch": 1726860725,
|
|
32
32
|
"versions": [
|
|
33
|
+
"5.5.1",
|
|
33
34
|
"5.5.0",
|
|
34
35
|
"5.4.2",
|
|
35
36
|
"5.4.1",
|
|
@@ -73,7 +74,7 @@ def get_provider_info():
|
|
|
73
74
|
],
|
|
74
75
|
"dependencies": [
|
|
75
76
|
"apache-airflow>=2.8.0",
|
|
76
|
-
"apache-airflow-providers-common-sql>=1.
|
|
77
|
+
"apache-airflow-providers-common-sql>=1.17.0",
|
|
77
78
|
"elasticsearch>=8.10,<9",
|
|
78
79
|
],
|
|
79
80
|
"integrations": [
|
|
@@ -23,7 +23,6 @@ from urllib import parse
|
|
|
23
23
|
|
|
24
24
|
from deprecated import deprecated
|
|
25
25
|
from elasticsearch import Elasticsearch
|
|
26
|
-
from elasticsearch.client import SqlClient
|
|
27
26
|
|
|
28
27
|
from airflow.exceptions import AirflowProviderDeprecationWarning
|
|
29
28
|
from airflow.hooks.base import BaseHook
|
|
@@ -70,11 +69,10 @@ class ESConnection:
|
|
|
70
69
|
self.es = Elasticsearch(self.url, http_auth=(user, password), **self.kwargs)
|
|
71
70
|
else:
|
|
72
71
|
self.es = Elasticsearch(self.url, **self.kwargs)
|
|
73
|
-
self.es_sql_client = SqlClient(self.es)
|
|
74
72
|
|
|
75
73
|
def execute_sql(self, query: str) -> ObjectApiResponse:
|
|
76
74
|
sql_query = {"query": query}
|
|
77
|
-
return self.
|
|
75
|
+
return self.es.sql.query(body=sql_query)
|
|
78
76
|
|
|
79
77
|
|
|
80
78
|
class ElasticsearchSQLHook(DbApiHook):
|
|
@@ -95,12 +93,11 @@ class ElasticsearchSQLHook(DbApiHook):
|
|
|
95
93
|
def __init__(self, schema: str = "http", connection: AirflowConnection | None = None, *args, **kwargs):
|
|
96
94
|
super().__init__(*args, **kwargs)
|
|
97
95
|
self.schema = schema
|
|
98
|
-
self.
|
|
96
|
+
self._connection = connection
|
|
99
97
|
|
|
100
98
|
def get_conn(self) -> ESConnection:
|
|
101
99
|
"""Return an elasticsearch connection object."""
|
|
102
|
-
|
|
103
|
-
conn = self.connection or self.get_connection(conn_id)
|
|
100
|
+
conn = self.connection
|
|
104
101
|
|
|
105
102
|
conn_args = {
|
|
106
103
|
"host": conn.host,
|
|
@@ -119,8 +116,7 @@ class ElasticsearchSQLHook(DbApiHook):
|
|
|
119
116
|
return connect(**conn_args)
|
|
120
117
|
|
|
121
118
|
def get_uri(self) -> str:
|
|
122
|
-
|
|
123
|
-
conn = self.connection or self.get_connection(conn_id)
|
|
119
|
+
conn = self.connection
|
|
124
120
|
|
|
125
121
|
login = ""
|
|
126
122
|
if conn.login:
|
|
@@ -158,14 +158,14 @@ class ElasticsearchTaskHandler(FileTaskHandler, ExternalLoggingMixin, LoggingMix
|
|
|
158
158
|
index_patterns_callable: str = conf.get("elasticsearch", "index_patterns_callable", fallback=""),
|
|
159
159
|
es_kwargs: dict | None | Literal["default_es_kwargs"] = "default_es_kwargs",
|
|
160
160
|
*,
|
|
161
|
-
filename_template: str | None = None,
|
|
162
161
|
log_id_template: str | None = None,
|
|
162
|
+
**kwargs,
|
|
163
163
|
):
|
|
164
164
|
es_kwargs = es_kwargs or {}
|
|
165
165
|
if es_kwargs == "default_es_kwargs":
|
|
166
166
|
es_kwargs = get_es_kwargs_from_config()
|
|
167
167
|
host = self.format_url(host)
|
|
168
|
-
super().__init__(base_log_folder
|
|
168
|
+
super().__init__(base_log_folder)
|
|
169
169
|
self.closed = False
|
|
170
170
|
|
|
171
171
|
self.client = elasticsearch.Elasticsearch(host, **es_kwargs)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: apache-airflow-providers-elasticsearch
|
|
3
|
-
Version: 5.5.
|
|
3
|
+
Version: 5.5.1
|
|
4
4
|
Summary: Provider package apache-airflow-providers-elasticsearch for Apache Airflow
|
|
5
5
|
Keywords: airflow-provider,elasticsearch,airflow,integration
|
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
|
@@ -21,13 +21,13 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.12
|
|
23
23
|
Classifier: Topic :: System :: Monitoring
|
|
24
|
-
Requires-Dist: apache-airflow-providers-common-sql>=1.
|
|
24
|
+
Requires-Dist: apache-airflow-providers-common-sql>=1.17.0
|
|
25
25
|
Requires-Dist: apache-airflow>=2.8.0
|
|
26
26
|
Requires-Dist: elasticsearch>=8.10,<9
|
|
27
27
|
Requires-Dist: apache-airflow-providers-common-sql ; extra == "common.sql"
|
|
28
28
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
29
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-elasticsearch/5.5.
|
|
30
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-elasticsearch/5.5.
|
|
29
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-elasticsearch/5.5.1/changelog.html
|
|
30
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-elasticsearch/5.5.1
|
|
31
31
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
32
32
|
Project-URL: Source Code, https://github.com/apache/airflow
|
|
33
33
|
Project-URL: Twitter, https://twitter.com/ApacheAirflow
|
|
@@ -78,7 +78,7 @@ Provides-Extra: common.sql
|
|
|
78
78
|
|
|
79
79
|
Package ``apache-airflow-providers-elasticsearch``
|
|
80
80
|
|
|
81
|
-
Release: ``5.5.
|
|
81
|
+
Release: ``5.5.1``
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
`Elasticsearch <https://www.elastic.co/elasticsearch>`__
|
|
@@ -91,7 +91,7 @@ This is a provider package for ``elasticsearch`` provider. All classes for this
|
|
|
91
91
|
are in ``airflow.providers.elasticsearch`` python package.
|
|
92
92
|
|
|
93
93
|
You can find package information and changelog for the provider
|
|
94
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-elasticsearch/5.5.
|
|
94
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-elasticsearch/5.5.1/>`_.
|
|
95
95
|
|
|
96
96
|
Installation
|
|
97
97
|
------------
|
|
@@ -109,7 +109,7 @@ Requirements
|
|
|
109
109
|
PIP package Version required
|
|
110
110
|
======================================= ==================
|
|
111
111
|
``apache-airflow`` ``>=2.8.0``
|
|
112
|
-
``apache-airflow-providers-common-sql`` ``>=1.
|
|
112
|
+
``apache-airflow-providers-common-sql`` ``>=1.17.0``
|
|
113
113
|
``elasticsearch`` ``>=8.10,<9``
|
|
114
114
|
======================================= ==================
|
|
115
115
|
|
|
@@ -133,4 +133,4 @@ Dependent package
|
|
|
133
133
|
============================================================================================================ ==============
|
|
134
134
|
|
|
135
135
|
The changelog for the provider package can be found in the
|
|
136
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-elasticsearch/5.5.
|
|
136
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-elasticsearch/5.5.1/changelog.html>`_.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
airflow/providers/elasticsearch/LICENSE,sha256=FFb4jd2AXnOOf7XLP04pQW6jbdhG49TxlGY6fFpCV1Y,13609
|
|
2
|
+
airflow/providers/elasticsearch/__init__.py,sha256=Yw9lh1G0gFbnqycc5s7WzWHqT2yTePc9M-qs4dPbx10,1500
|
|
3
|
+
airflow/providers/elasticsearch/get_provider_info.py,sha256=4XSPMBMY7n3S6airTfKBCkyiRdcm7UBM4XA72FwlYgs,8571
|
|
4
|
+
airflow/providers/elasticsearch/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
|
5
|
+
airflow/providers/elasticsearch/hooks/elasticsearch.py,sha256=TPIRIqS0lu7apfofxKKfg9kO7-8Qo2ippdL1uEk7B3g,6393
|
|
6
|
+
airflow/providers/elasticsearch/log/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
7
|
+
airflow/providers/elasticsearch/log/es_json_formatter.py,sha256=DwWPDJtZLr_6Mdae1-XVEgmE1XErFIanSzxWovs50ig,1796
|
|
8
|
+
airflow/providers/elasticsearch/log/es_response.py,sha256=tEFz1pAUzIg6Zw43ZjiHFTOB72kNP-czbEwMbymUZ88,6037
|
|
9
|
+
airflow/providers/elasticsearch/log/es_task_handler.py,sha256=6EoPQZrCW6-SwLSDd6iH3Wp02UTeMlQ8CTbwEWdN6Lw,26202
|
|
10
|
+
apache_airflow_providers_elasticsearch-5.5.1.dist-info/entry_points.txt,sha256=jpgAUVmTsdtWQ4nru2FJQKP9JBN4OPHK-ybfYc3_BOs,109
|
|
11
|
+
apache_airflow_providers_elasticsearch-5.5.1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
|
12
|
+
apache_airflow_providers_elasticsearch-5.5.1.dist-info/METADATA,sha256=tIWzBvGjtV9VmuskVpYszLHQaNnec5LDWOfj4AH_DHg,6219
|
|
13
|
+
apache_airflow_providers_elasticsearch-5.5.1.dist-info/RECORD,,
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
airflow/providers/elasticsearch/LICENSE,sha256=FFb4jd2AXnOOf7XLP04pQW6jbdhG49TxlGY6fFpCV1Y,13609
|
|
2
|
-
airflow/providers/elasticsearch/__init__.py,sha256=DUInY8SIk_5Q8021oPu8RuqeryFZXyHXhabyylhpNfg,1500
|
|
3
|
-
airflow/providers/elasticsearch/get_provider_info.py,sha256=x-lrFwkMRUOZEhAQm9fBjBMOLRxOyg0rdsQbMeWgDoE,8550
|
|
4
|
-
airflow/providers/elasticsearch/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
|
5
|
-
airflow/providers/elasticsearch/hooks/elasticsearch.py,sha256=iOlHR7X8ZYQ0AS939k7ChWfpojDQCtipZJBwx0aGWfw,6628
|
|
6
|
-
airflow/providers/elasticsearch/log/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
7
|
-
airflow/providers/elasticsearch/log/es_json_formatter.py,sha256=DwWPDJtZLr_6Mdae1-XVEgmE1XErFIanSzxWovs50ig,1796
|
|
8
|
-
airflow/providers/elasticsearch/log/es_response.py,sha256=tEFz1pAUzIg6Zw43ZjiHFTOB72kNP-czbEwMbymUZ88,6037
|
|
9
|
-
airflow/providers/elasticsearch/log/es_task_handler.py,sha256=gSbETwbWwv0HvPXZGqqDmyiFoP-keOGuJPPZwJSn5dY,26249
|
|
10
|
-
apache_airflow_providers_elasticsearch-5.5.0.dist-info/entry_points.txt,sha256=jpgAUVmTsdtWQ4nru2FJQKP9JBN4OPHK-ybfYc3_BOs,109
|
|
11
|
-
apache_airflow_providers_elasticsearch-5.5.0.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
|
12
|
-
apache_airflow_providers_elasticsearch-5.5.0.dist-info/METADATA,sha256=Ft2LxCG1wzAp3idUQhlG1GFyBsk5K3ix80_59Qk54Lw,6219
|
|
13
|
-
apache_airflow_providers_elasticsearch-5.5.0.dist-info/RECORD,,
|
|
File without changes
|