Skip to content

Commit e828773

Browse files
authored
Fixup docstring for deprecated DataprocSubmitHiveJobOperator (#32723)
1 parent 8b7ae76 commit e828773

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

β€Žairflow/providers/google/cloud/operators/dataproc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,6 +1204,10 @@ def execute(self, context: Context):
12041204
class DataprocSubmitHiveJobOperator(DataprocJobBaseOperator):
12051205
"""Start a Hive query Job on a Cloud DataProc cluster.
12061206
1207+
.. seealso::
1208+
This operator is deprecated, please use
1209+
:class:`~airflow.providers.google.cloud.operators.dataproc.DataprocSubmitJobOperator`:
1210+
12071211
:param query: The query or reference to the query file (q extension).
12081212
:param query_uri: The HCFS URI of the script that contains the Hive queries.
12091213
:param variables: Map of named parameters for the query.

β€Žtests/system/providers/google/cloud/dataproc/example_dataproc_hive.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
schedule="@once",
7575
start_date=datetime(2021, 1, 1),
7676
catchup=False,
77-
tags=["example", "dataproc"],
77+
tags=["example", "dataproc", "hive"],
7878
) as dag:
7979
# [START how_to_cloud_dataproc_create_cluster_operator]
8080
create_cluster = DataprocCreateClusterOperator(
@@ -100,7 +100,14 @@
100100
# [END how_to_cloud_dataproc_delete_cluster_operator]
101101
delete_cluster.trigger_rule = TriggerRule.ALL_DONE
102102

103-
create_cluster >> hive_task >> delete_cluster
103+
(
104+
# TEST SETUP
105+
create_cluster
106+
# TEST BODY
107+
>> hive_task
108+
# TEST TEARDOWN
109+
>> delete_cluster
110+
)
104111

105112
from tests.system.utils.watcher import watcher
106113

0 commit comments

Comments
 (0)