apache-airflow-providers-apache-hive 8.2.0rc1__tar.gz → 8.2.1rc1__tar.gz

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.
Files changed (26) hide show
  1. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/PKG-INFO +16 -17
  2. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/README.rst +5 -5
  3. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/__init__.py +1 -1
  4. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/get_provider_info.py +3 -2
  5. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/hooks/hive.py +6 -4
  6. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/transfers/mysql_to_hive.py +10 -1
  7. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/transfers/s3_to_hive.py +24 -5
  8. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/pyproject.toml +6 -8
  9. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/LICENSE +0 -0
  10. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/hooks/__init__.py +0 -0
  11. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/macros/__init__.py +0 -0
  12. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/macros/hive.py +0 -0
  13. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/operators/__init__.py +0 -0
  14. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/operators/hive.py +0 -0
  15. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/operators/hive_stats.py +0 -0
  16. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/plugins/__init__.py +0 -0
  17. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/plugins/hive.py +0 -0
  18. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/sensors/__init__.py +0 -0
  19. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/sensors/hive_partition.py +0 -0
  20. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/sensors/metastore_partition.py +0 -0
  21. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/sensors/named_hive_partition.py +0 -0
  22. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/transfers/__init__.py +0 -0
  23. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/transfers/hive_to_mysql.py +0 -0
  24. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/transfers/hive_to_samba.py +0 -0
  25. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/transfers/mssql_to_hive.py +0 -0
  26. {apache_airflow_providers_apache_hive-8.2.0rc1 → apache_airflow_providers_apache_hive-8.2.1rc1}/airflow/providers/apache/hive/transfers/vertica_to_hive.py +0 -0
@@ -1,11 +1,11 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: apache-airflow-providers-apache-hive
3
- Version: 8.2.0rc1
3
+ Version: 8.2.1rc1
4
4
  Summary: Provider package apache-airflow-providers-apache-hive for Apache Airflow
5
5
  Keywords: airflow-provider,apache.hive,airflow,integration
6
6
  Author-email: Apache Software Foundation <dev@airflow.apache.org>
7
7
  Maintainer-email: Apache Software Foundation <dev@airflow.apache.org>
8
- Requires-Python: ~=3.8
8
+ Requires-Python: ~=3.9
9
9
  Description-Content-Type: text/x-rst
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Environment :: Console
@@ -15,37 +15,36 @@ Classifier: Intended Audience :: System Administrators
15
15
  Classifier: Framework :: Apache Airflow
16
16
  Classifier: Framework :: Apache Airflow :: Provider
17
17
  Classifier: License :: OSI Approved :: Apache Software License
18
- Classifier: Programming Language :: Python :: 3.8
19
18
  Classifier: Programming Language :: Python :: 3.9
20
19
  Classifier: Programming Language :: Python :: 3.10
21
20
  Classifier: Programming Language :: Python :: 3.11
22
21
  Classifier: Programming Language :: Python :: 3.12
23
22
  Classifier: Topic :: System :: Monitoring
24
- Requires-Dist: apache-airflow-providers-common-sql>=1.3.1rc0
23
+ Requires-Dist: apache-airflow-providers-common-sql>=1.20.0rc0
25
24
  Requires-Dist: apache-airflow>=2.8.0rc0
26
25
  Requires-Dist: hmsclient>=0.1.0
27
26
  Requires-Dist: jmespath>=0.7.0
28
27
  Requires-Dist: pandas>=1.5.3,<2.2;python_version<"3.9"
29
28
  Requires-Dist: pandas>=2.1.2,<2.2;python_version>="3.9"
30
- Requires-Dist: pyhive[hive_pure_sasl]>=0.7.0
29
+ Requires-Dist: pyhive[hive-pure-sasl]>=0.7.0
31
30
  Requires-Dist: thrift>=0.11.0
32
31
  Requires-Dist: apache-airflow-providers-amazon ; extra == "amazon"
33
- Requires-Dist: apache-airflow-providers-common-sql ; extra == "common.sql"
34
- Requires-Dist: apache-airflow-providers-microsoft-mssql ; extra == "microsoft.mssql"
32
+ Requires-Dist: apache-airflow-providers-common-sql ; extra == "common-sql"
33
+ Requires-Dist: apache-airflow-providers-microsoft-mssql ; extra == "microsoft-mssql"
35
34
  Requires-Dist: apache-airflow-providers-mysql ; extra == "mysql"
36
35
  Requires-Dist: apache-airflow-providers-presto ; extra == "presto"
37
36
  Requires-Dist: apache-airflow-providers-samba ; extra == "samba"
38
37
  Requires-Dist: apache-airflow-providers-vertica ; extra == "vertica"
39
38
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
40
- Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/8.2.0/changelog.html
41
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/8.2.0
39
+ Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/8.2.1/changelog.html
40
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/8.2.1
42
41
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
43
42
  Project-URL: Source Code, https://github.com/apache/airflow
44
43
  Project-URL: Twitter, https://twitter.com/ApacheAirflow
45
44
  Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
46
45
  Provides-Extra: amazon
47
- Provides-Extra: common.sql
48
- Provides-Extra: microsoft.mssql
46
+ Provides-Extra: common-sql
47
+ Provides-Extra: microsoft-mssql
49
48
  Provides-Extra: mysql
50
49
  Provides-Extra: presto
51
50
  Provides-Extra: samba
@@ -95,7 +94,7 @@ Provides-Extra: vertica
95
94
 
96
95
  Package ``apache-airflow-providers-apache-hive``
97
96
 
98
- Release: ``8.2.0.rc1``
97
+ Release: ``8.2.1.rc1``
99
98
 
100
99
 
101
100
  `Apache Hive <https://hive.apache.org/>`__
@@ -108,7 +107,7 @@ This is a provider package for ``apache.hive`` provider. All classes for this pr
108
107
  are in ``airflow.providers.apache.hive`` python package.
109
108
 
110
109
  You can find package information and changelog for the provider
111
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/8.2.0/>`_.
110
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/8.2.1/>`_.
112
111
 
113
112
  Installation
114
113
  ------------
@@ -117,7 +116,7 @@ You can install this package on top of an existing Airflow 2 installation (see `
117
116
  for the minimum Airflow version supported) via
118
117
  ``pip install apache-airflow-providers-apache-hive``
119
118
 
120
- The package supports the following python versions: 3.8,3.9,3.10,3.11,3.12
119
+ The package supports the following python versions: 3.9,3.10,3.11,3.12
121
120
 
122
121
  Requirements
123
122
  ------------
@@ -126,7 +125,7 @@ Requirements
126
125
  PIP package Version required
127
126
  ======================================= =========================================
128
127
  ``apache-airflow`` ``>=2.8.0``
129
- ``apache-airflow-providers-common-sql`` ``>=1.3.1``
128
+ ``apache-airflow-providers-common-sql`` ``>=1.20.0``
130
129
  ``hmsclient`` ``>=0.1.0``
131
130
  ``pandas`` ``>=2.1.2,<2.2; python_version >= "3.9"``
132
131
  ``pandas`` ``>=1.5.3,<2.2; python_version < "3.9"``
@@ -161,4 +160,4 @@ Dependent package
161
160
  ====================================================================================================================== ===================
162
161
 
163
162
  The changelog for the provider package can be found in the
164
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/8.2.0/changelog.html>`_.
163
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/8.2.1/changelog.html>`_.
@@ -42,7 +42,7 @@
42
42
 
43
43
  Package ``apache-airflow-providers-apache-hive``
44
44
 
45
- Release: ``8.2.0.rc1``
45
+ Release: ``8.2.1.rc1``
46
46
 
47
47
 
48
48
  `Apache Hive <https://hive.apache.org/>`__
@@ -55,7 +55,7 @@ This is a provider package for ``apache.hive`` provider. All classes for this pr
55
55
  are in ``airflow.providers.apache.hive`` python package.
56
56
 
57
57
  You can find package information and changelog for the provider
58
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/8.2.0/>`_.
58
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/8.2.1/>`_.
59
59
 
60
60
  Installation
61
61
  ------------
@@ -64,7 +64,7 @@ You can install this package on top of an existing Airflow 2 installation (see `
64
64
  for the minimum Airflow version supported) via
65
65
  ``pip install apache-airflow-providers-apache-hive``
66
66
 
67
- The package supports the following python versions: 3.8,3.9,3.10,3.11,3.12
67
+ The package supports the following python versions: 3.9,3.10,3.11,3.12
68
68
 
69
69
  Requirements
70
70
  ------------
@@ -73,7 +73,7 @@ Requirements
73
73
  PIP package Version required
74
74
  ======================================= =========================================
75
75
  ``apache-airflow`` ``>=2.8.0``
76
- ``apache-airflow-providers-common-sql`` ``>=1.3.1``
76
+ ``apache-airflow-providers-common-sql`` ``>=1.20.0``
77
77
  ``hmsclient`` ``>=0.1.0``
78
78
  ``pandas`` ``>=2.1.2,<2.2; python_version >= "3.9"``
79
79
  ``pandas`` ``>=1.5.3,<2.2; python_version < "3.9"``
@@ -108,4 +108,4 @@ Dependent package
108
108
  ====================================================================================================================== ===================
109
109
 
110
110
  The changelog for the provider package can be found in the
111
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/8.2.0/changelog.html>`_.
111
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/8.2.1/changelog.html>`_.
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "8.2.0"
32
+ __version__ = "8.2.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": "Apache Hive",
29
29
  "description": "`Apache Hive <https://hive.apache.org/>`__\n",
30
30
  "state": "ready",
31
- "source-date-epoch": 1723969208,
31
+ "source-date-epoch": 1731569312,
32
32
  "versions": [
33
+ "8.2.1",
33
34
  "8.2.0",
34
35
  "8.1.2",
35
36
  "8.1.1",
@@ -78,7 +79,7 @@ def get_provider_info():
78
79
  ],
79
80
  "dependencies": [
80
81
  "apache-airflow>=2.8.0",
81
- "apache-airflow-providers-common-sql>=1.3.1",
82
+ "apache-airflow-providers-common-sql>=1.20.0",
82
83
  "hmsclient>=0.1.0",
83
84
  'pandas>=2.1.2,<2.2;python_version>="3.9"',
84
85
  'pandas>=1.5.3,<2.2;python_version<"3.9"',
@@ -23,8 +23,9 @@ import re
23
23
  import socket
24
24
  import subprocess
25
25
  import time
26
+ from collections.abc import Iterable, Mapping
26
27
  from tempfile import NamedTemporaryFile, TemporaryDirectory
27
- from typing import TYPE_CHECKING, Any, Iterable, Mapping
28
+ from typing import TYPE_CHECKING, Any
28
29
 
29
30
  if TYPE_CHECKING:
30
31
  import pandas as pd
@@ -411,9 +412,10 @@ class HiveCliHook(BaseHook):
411
412
  if pandas_kwargs is None:
412
413
  pandas_kwargs = {}
413
414
 
414
- with TemporaryDirectory(prefix="airflow_hiveop_") as tmp_dir, NamedTemporaryFile(
415
- dir=tmp_dir, mode="w"
416
- ) as f:
415
+ with (
416
+ TemporaryDirectory(prefix="airflow_hiveop_") as tmp_dir,
417
+ NamedTemporaryFile(dir=tmp_dir, mode="w") as f,
418
+ ):
417
419
  if field_dict is None:
418
420
  field_dict = _infer_field_types_from_df(df)
419
421
 
@@ -24,7 +24,16 @@ from contextlib import closing
24
24
  from tempfile import NamedTemporaryFile
25
25
  from typing import TYPE_CHECKING, Sequence
26
26
 
27
- import MySQLdb
27
+ try:
28
+ import MySQLdb
29
+ except ImportError:
30
+ raise RuntimeError(
31
+ "You do not have `mysqlclient` package installed. "
32
+ "Please install it with `pip install mysqlclient` and make sure you have system "
33
+ "mysql libraries installed, as well as well as `pkg-config` system package "
34
+ "installed in case you see compilation error during installation."
35
+ )
36
+
28
37
 
29
38
  from airflow.models import BaseOperator
30
39
  from airflow.providers.apache.hive.hooks.hive import HiveCliHook
@@ -22,15 +22,16 @@ from __future__ import annotations
22
22
  import bz2
23
23
  import gzip
24
24
  import os
25
+ import shutil
25
26
  import tempfile
27
+ from collections.abc import Sequence
26
28
  from tempfile import NamedTemporaryFile, TemporaryDirectory
27
- from typing import TYPE_CHECKING, Any, Sequence
29
+ from typing import TYPE_CHECKING, Any
28
30
 
29
31
  from airflow.exceptions import AirflowException
30
32
  from airflow.models import BaseOperator
31
33
  from airflow.providers.amazon.aws.hooks.s3 import S3Hook
32
34
  from airflow.providers.apache.hive.hooks.hive import HiveCliHook
33
- from airflow.utils.compression import uncompress_file
34
35
 
35
36
  if TYPE_CHECKING:
36
37
  from airflow.utils.context import Context
@@ -161,9 +162,10 @@ class S3ToHiveOperator(BaseOperator):
161
162
  if self.select_expression and self.input_compressed and file_ext.lower() != ".gz":
162
163
  raise AirflowException("GZIP is the only compression format Amazon S3 Select supports")
163
164
 
164
- with TemporaryDirectory(prefix="tmps32hive_") as tmp_dir, NamedTemporaryFile(
165
- mode="wb", dir=tmp_dir, suffix=file_ext
166
- ) as f:
165
+ with (
166
+ TemporaryDirectory(prefix="tmps32hive_") as tmp_dir,
167
+ NamedTemporaryFile(mode="wb", dir=tmp_dir, suffix=file_ext) as f,
168
+ ):
167
169
  self.log.info("Dumping S3 key %s contents to local file %s", s3_key_object.key, f.name)
168
170
  if self.select_expression:
169
171
  option = {}
@@ -275,3 +277,20 @@ class S3ToHiveOperator(BaseOperator):
275
277
  for line in f_in:
276
278
  f_out.write(line)
277
279
  return fn_output
280
+
281
+
282
+ def uncompress_file(input_file_name, file_extension, dest_dir):
283
+ """Uncompress gz and bz2 files."""
284
+ if file_extension.lower() not in (".gz", ".bz2"):
285
+ raise NotImplementedError(
286
+ f"Received {file_extension} format. Only gz and bz2 files can currently be uncompressed."
287
+ )
288
+ if file_extension.lower() == ".gz":
289
+ fmodule = gzip.GzipFile
290
+ elif file_extension.lower() == ".bz2":
291
+ fmodule = bz2.BZ2File
292
+ with fmodule(input_file_name, mode="rb") as f_compressed, NamedTemporaryFile(
293
+ dir=dest_dir, mode="wb", delete=False
294
+ ) as f_uncompressed:
295
+ shutil.copyfileobj(f_compressed, f_uncompressed)
296
+ return f_uncompressed.name
@@ -21,14 +21,13 @@
21
21
 
22
22
  # IF YOU WANT TO MODIFY THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
23
23
  # `pyproject_TEMPLATE.toml.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
24
- #
25
24
  [build-system]
26
- requires = ["flit_core >=3.2,<4"]
25
+ requires = ["flit_core==3.10.1"]
27
26
  build-backend = "flit_core.buildapi"
28
27
 
29
28
  [project]
30
29
  name = "apache-airflow-providers-apache-hive"
31
- version = "8.2.0.rc1"
30
+ version = "8.2.1.rc1"
32
31
  description = "Provider package apache-airflow-providers-apache-hive for Apache Airflow"
33
32
  readme = "README.rst"
34
33
  authors = [
@@ -47,16 +46,15 @@ classifiers = [
47
46
  "Framework :: Apache Airflow",
48
47
  "Framework :: Apache Airflow :: Provider",
49
48
  "License :: OSI Approved :: Apache Software License",
50
- "Programming Language :: Python :: 3.8",
51
49
  "Programming Language :: Python :: 3.9",
52
50
  "Programming Language :: Python :: 3.10",
53
51
  "Programming Language :: Python :: 3.11",
54
52
  "Programming Language :: Python :: 3.12",
55
53
  "Topic :: System :: Monitoring",
56
54
  ]
57
- requires-python = "~=3.8"
55
+ requires-python = "~=3.9"
58
56
  dependencies = [
59
- "apache-airflow-providers-common-sql>=1.3.1rc0",
57
+ "apache-airflow-providers-common-sql>=1.20.0rc0",
60
58
  "apache-airflow>=2.8.0rc0",
61
59
  "hmsclient>=0.1.0",
62
60
  "jmespath>=0.7.0",
@@ -67,8 +65,8 @@ dependencies = [
67
65
  ]
68
66
 
69
67
  [project.urls]
70
- "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/8.2.0"
71
- "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/8.2.0/changelog.html"
68
+ "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/8.2.1"
69
+ "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/8.2.1/changelog.html"
72
70
  "Bug Tracker" = "https://github.com/apache/airflow/issues"
73
71
  "Source Code" = "https://github.com/apache/airflow"
74
72
  "Slack Chat" = "https://s.apache.org/airflow-slack"