apache-airflow-providers-apache-hive 6.5.0rc1__tar.gz → 7.0.0rc1__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-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/PKG-INFO +8 -8
  2. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/README.rst +4 -4
  3. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/__init__.py +1 -1
  4. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/get_provider_info.py +3 -2
  5. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/hooks/hive.py +30 -15
  6. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/operators/hive.py +0 -6
  7. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/pyproject.toml +4 -4
  8. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/LICENSE +0 -0
  9. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/hooks/__init__.py +0 -0
  10. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/macros/__init__.py +0 -0
  11. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/macros/hive.py +0 -0
  12. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/operators/__init__.py +0 -0
  13. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/operators/hive_stats.py +0 -0
  14. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/plugins/__init__.py +0 -0
  15. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/plugins/hive.py +0 -0
  16. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/sensors/__init__.py +0 -0
  17. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/sensors/hive_partition.py +0 -0
  18. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/sensors/metastore_partition.py +0 -0
  19. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/sensors/named_hive_partition.py +0 -0
  20. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/transfers/__init__.py +0 -0
  21. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/transfers/hive_to_mysql.py +0 -0
  22. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/transfers/hive_to_samba.py +0 -0
  23. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/transfers/mssql_to_hive.py +0 -0
  24. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/transfers/mysql_to_hive.py +0 -0
  25. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/transfers/s3_to_hive.py +0 -0
  26. {apache_airflow_providers_apache_hive-6.5.0rc1 → apache_airflow_providers_apache_hive-7.0.0rc1}/airflow/providers/apache/hive/transfers/vertica_to_hive.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apache-airflow-providers-apache-hive
3
- Version: 6.5.0rc1
3
+ Version: 7.0.0rc1
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>
@@ -24,7 +24,7 @@ Requires-Dist: apache-airflow-providers-common-sql>=1.3.1.dev0
24
24
  Requires-Dist: apache-airflow>=2.6.0.dev0
25
25
  Requires-Dist: hmsclient>=0.1.0
26
26
  Requires-Dist: pandas>=1.2.5
27
- Requires-Dist: pyhive[hive-pure-sasl]>=0.7.0
27
+ Requires-Dist: pyhive[hive_pure_sasl]>=0.7.0
28
28
  Requires-Dist: thrift>=0.9.2
29
29
  Requires-Dist: apache-airflow-providers-amazon ; extra == "amazon"
30
30
  Requires-Dist: apache-airflow-providers-common-sql ; extra == "common.sql"
@@ -34,8 +34,8 @@ Requires-Dist: apache-airflow-providers-presto ; extra == "presto"
34
34
  Requires-Dist: apache-airflow-providers-samba ; extra == "samba"
35
35
  Requires-Dist: apache-airflow-providers-vertica ; extra == "vertica"
36
36
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
37
- Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/6.5.0/changelog.html
38
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/6.5.0
37
+ Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/7.0.0/changelog.html
38
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/7.0.0
39
39
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
40
40
  Project-URL: Source Code, https://github.com/apache/airflow
41
41
  Project-URL: Twitter, https://twitter.com/ApacheAirflow
@@ -92,7 +92,7 @@ Provides-Extra: vertica
92
92
 
93
93
  Package ``apache-airflow-providers-apache-hive``
94
94
 
95
- Release: ``6.5.0.rc1``
95
+ Release: ``7.0.0.rc1``
96
96
 
97
97
 
98
98
  `Apache Hive <https://hive.apache.org/>`__
@@ -105,7 +105,7 @@ This is a provider package for ``apache.hive`` provider. All classes for this pr
105
105
  are in ``airflow.providers.apache.hive`` python package.
106
106
 
107
107
  You can find package information and changelog for the provider
108
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/6.5.0/>`_.
108
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/7.0.0/>`_.
109
109
 
110
110
  Installation
111
111
  ------------
@@ -126,7 +126,7 @@ PIP package Version required
126
126
  ``apache-airflow-providers-common-sql`` ``>=1.3.1``
127
127
  ``hmsclient`` ``>=0.1.0``
128
128
  ``pandas`` ``>=1.2.5``
129
- ``pyhive[hive-pure-sasl]`` ``>=0.7.0``
129
+ ``pyhive[hive_pure_sasl]`` ``>=0.7.0``
130
130
  ``thrift`` ``>=0.9.2``
131
131
  ======================================= ==================
132
132
 
@@ -156,4 +156,4 @@ Dependent package
156
156
  ====================================================================================================================== ===================
157
157
 
158
158
  The changelog for the provider package can be found in the
159
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/6.5.0/changelog.html>`_.
159
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/7.0.0/changelog.html>`_.
@@ -42,7 +42,7 @@
42
42
 
43
43
  Package ``apache-airflow-providers-apache-hive``
44
44
 
45
- Release: ``6.5.0.rc1``
45
+ Release: ``7.0.0.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/6.5.0/>`_.
58
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/7.0.0/>`_.
59
59
 
60
60
  Installation
61
61
  ------------
@@ -76,7 +76,7 @@ PIP package Version required
76
76
  ``apache-airflow-providers-common-sql`` ``>=1.3.1``
77
77
  ``hmsclient`` ``>=0.1.0``
78
78
  ``pandas`` ``>=1.2.5``
79
- ``pyhive[hive-pure-sasl]`` ``>=0.7.0``
79
+ ``pyhive[hive_pure_sasl]`` ``>=0.7.0``
80
80
  ``thrift`` ``>=0.9.2``
81
81
  ======================================= ==================
82
82
 
@@ -106,4 +106,4 @@ Dependent package
106
106
  ====================================================================================================================== ===================
107
107
 
108
108
  The changelog for the provider package can be found in the
109
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/6.5.0/changelog.html>`_.
109
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/7.0.0/changelog.html>`_.
@@ -27,7 +27,7 @@ import packaging.version
27
27
 
28
28
  __all__ = ["__version__"]
29
29
 
30
- __version__ = "6.5.0"
30
+ __version__ = "7.0.0"
31
31
 
32
32
  try:
33
33
  from airflow import __version__ as airflow_version
@@ -30,7 +30,8 @@ def get_provider_info():
30
30
  "state": "ready",
31
31
  "source-date-epoch": 1705911912,
32
32
  "versions": [
33
- "6.5.0",
33
+ "7.0.0",
34
+ "6.4.2",
34
35
  "6.4.1",
35
36
  "6.4.0",
36
37
  "6.3.0",
@@ -74,7 +75,7 @@ def get_provider_info():
74
75
  "apache-airflow-providers-common-sql>=1.3.1",
75
76
  "hmsclient>=0.1.0",
76
77
  "pandas>=1.2.5",
77
- "pyhive[hive-pure-sasl]>=0.7.0",
78
+ "pyhive[hive_pure_sasl]>=0.7.0",
78
79
  "thrift>=0.9.2",
79
80
  ],
80
81
  "integrations": [
@@ -91,22 +91,19 @@ class HiveCliHook(BaseHook):
91
91
  def __init__(
92
92
  self,
93
93
  hive_cli_conn_id: str = default_conn_name,
94
- run_as: str | None = None,
95
94
  mapred_queue: str | None = None,
96
95
  mapred_queue_priority: str | None = None,
97
96
  mapred_job_name: str | None = None,
98
97
  hive_cli_params: str = "",
99
98
  auth: str | None = None,
100
99
  proxy_user: str | None = None,
101
- **kwargs,
102
100
  ) -> None:
103
- super().__init__(**kwargs)
101
+ super().__init__()
104
102
  conn = self.get_connection(hive_cli_conn_id)
105
103
  self.hive_cli_params: str = hive_cli_params
106
104
  self.use_beeline: bool = conn.extra_dejson.get("use_beeline", False)
107
105
  self.auth = auth
108
106
  self.conn = conn
109
- self.run_as = run_as
110
107
  self.sub_process: Any = None
111
108
  if mapred_queue_priority:
112
109
  mapred_queue_priority = mapred_queue_priority.upper()
@@ -120,20 +117,38 @@ class HiveCliHook(BaseHook):
120
117
  self.mapred_job_name = mapred_job_name
121
118
  self.proxy_user = proxy_user
122
119
 
120
+ @classmethod
121
+ def get_connection_form_widgets(cls) -> dict[str, Any]:
122
+ """Return connection widgets to add to Hive Client Wrapper connection form."""
123
+ from flask_appbuilder.fieldwidgets import BS3TextFieldWidget
124
+ from flask_babel import lazy_gettext
125
+ from wtforms import BooleanField, StringField
126
+
127
+ return {
128
+ "use_beeline": BooleanField(lazy_gettext("Use Beeline"), default=False),
129
+ "proxy_user": StringField(lazy_gettext("Proxy User"), widget=BS3TextFieldWidget(), default=""),
130
+ "principal": StringField(
131
+ lazy_gettext("Principal"), widget=BS3TextFieldWidget(), default="hive/_HOST@EXAMPLE.COM"
132
+ ),
133
+ }
134
+
135
+ @classmethod
136
+ def get_ui_field_behaviour(cls) -> dict[str, Any]:
137
+ """Return custom UI field behaviour for Hive Client Wrapper connection."""
138
+ return {
139
+ "hidden_fields": ["extra"],
140
+ "relabeling": {},
141
+ }
142
+
123
143
  def _get_proxy_user(self) -> str:
124
144
  """Set the proper proxy_user value in case the user overwrite the default."""
125
145
  conn = self.conn
126
-
127
- proxy_user_value: str = conn.extra_dejson.get("proxy_user", "")
128
- if proxy_user_value == "login" and conn.login:
129
- return f"hive.server2.proxy.user={conn.login}"
130
- if proxy_user_value == "owner" and self.run_as:
131
- return f"hive.server2.proxy.user={self.run_as}"
132
- if proxy_user_value == "as_param" and self.proxy_user:
146
+ if self.proxy_user is not None:
133
147
  return f"hive.server2.proxy.user={self.proxy_user}"
134
- if proxy_user_value != "": # There is a custom proxy user
148
+ proxy_user_value: str = conn.extra_dejson.get("proxy_user", "")
149
+ if proxy_user_value != "":
135
150
  return f"hive.server2.proxy.user={proxy_user_value}"
136
- return proxy_user_value # The default proxy user (undefined)
151
+ return ""
137
152
 
138
153
  def _prepare_cli_cmd(self) -> list[Any]:
139
154
  """Create the command list from available information."""
@@ -496,8 +511,8 @@ class HiveMetastoreHook(BaseHook):
496
511
  conn_type = "hive_metastore"
497
512
  hook_name = "Hive Metastore Thrift"
498
513
 
499
- def __init__(self, metastore_conn_id: str = default_conn_name, **kwargs) -> None:
500
- super().__init__(**kwargs)
514
+ def __init__(self, metastore_conn_id: str = default_conn_name) -> None:
515
+ super().__init__()
501
516
  self.conn = self.get_connection(metastore_conn_id)
502
517
  self.metastore = self.get_metastore_client()
503
518
 
@@ -54,7 +54,6 @@ class HiveOperator(BaseOperator):
54
54
  object documentation for more details.
55
55
  :param script_begin_tag: If defined, the operator will get rid of the
56
56
  part of the script before the first occurrence of `script_begin_tag`
57
- :param run_as_owner: Run HQL code as a DAG's owner.
58
57
  :param mapred_queue: queue used by the Hadoop CapacityScheduler. (templated)
59
58
  :param mapred_queue_priority: priority within CapacityScheduler queue.
60
59
  Possible settings include: VERY_HIGH, HIGH, NORMAL, LOW, VERY_LOW
@@ -91,7 +90,6 @@ class HiveOperator(BaseOperator):
91
90
  hiveconfs: dict[Any, Any] | None = None,
92
91
  hiveconf_jinja_translate: bool = False,
93
92
  script_begin_tag: str | None = None,
94
- run_as_owner: bool = False,
95
93
  mapred_queue: str | None = None,
96
94
  mapred_queue_priority: str | None = None,
97
95
  mapred_job_name: str | None = None,
@@ -107,9 +105,6 @@ class HiveOperator(BaseOperator):
107
105
  self.hiveconfs = hiveconfs or {}
108
106
  self.hiveconf_jinja_translate = hiveconf_jinja_translate
109
107
  self.script_begin_tag = script_begin_tag
110
- self.run_as = None
111
- if run_as_owner:
112
- self.run_as = self.dag.owner
113
108
  self.mapred_queue = mapred_queue
114
109
  self.mapred_queue_priority = mapred_queue_priority
115
110
  self.mapred_job_name = mapred_job_name
@@ -128,7 +123,6 @@ class HiveOperator(BaseOperator):
128
123
  """Get Hive cli hook."""
129
124
  return HiveCliHook(
130
125
  hive_cli_conn_id=self.hive_cli_conn_id,
131
- run_as=self.run_as,
132
126
  mapred_queue=self.mapred_queue,
133
127
  mapred_queue_priority=self.mapred_queue_priority,
134
128
  mapred_job_name=self.mapred_job_name,
@@ -28,7 +28,7 @@ build-backend = "flit_core.buildapi"
28
28
 
29
29
  [project]
30
30
  name = "apache-airflow-providers-apache-hive"
31
- version = "6.5.0.rc1"
31
+ version = "7.0.0.rc1"
32
32
  description = "Provider package apache-airflow-providers-apache-hive for Apache Airflow"
33
33
  readme = "README.rst"
34
34
  authors = [
@@ -59,13 +59,13 @@ dependencies = [
59
59
  "apache-airflow>=2.6.0.dev0",
60
60
  "hmsclient>=0.1.0",
61
61
  "pandas>=1.2.5",
62
- "pyhive[hive-pure-sasl]>=0.7.0",
62
+ "pyhive[hive_pure_sasl]>=0.7.0",
63
63
  "thrift>=0.9.2",
64
64
  ]
65
65
 
66
66
  [project.urls]
67
- "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/6.5.0"
68
- "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/6.5.0/changelog.html"
67
+ "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/7.0.0"
68
+ "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-apache-hive/7.0.0/changelog.html"
69
69
  "Bug Tracker" = "https://github.com/apache/airflow/issues"
70
70
  "Source Code" = "https://github.com/apache/airflow"
71
71
  "Slack Chat" = "https://s.apache.org/airflow-slack"