Skip to content

Commit

Permalink
Fixup docstring for deprecated DataprocSubmitHiveJobOperator (#32723)
Browse files Browse the repository at this point in the history
  • Loading branch information
moiseenkov authored Jul 20, 2023
1 parent 8b7ae76 commit e828773
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions airflow/providers/google/cloud/operators/dataproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,10 @@ def execute(self, context: Context):
class DataprocSubmitHiveJobOperator(DataprocJobBaseOperator):
"""Start a Hive query Job on a Cloud DataProc cluster.
.. seealso::
This operator is deprecated, please use
:class:`~airflow.providers.google.cloud.operators.dataproc.DataprocSubmitJobOperator`:
:param query: The query or reference to the query file (q extension).
:param query_uri: The HCFS URI of the script that contains the Hive queries.
:param variables: Map of named parameters for the query.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
schedule="@once",
start_date=datetime(2021, 1, 1),
catchup=False,
tags=["example", "dataproc"],
tags=["example", "dataproc", "hive"],
) as dag:
# [START how_to_cloud_dataproc_create_cluster_operator]
create_cluster = DataprocCreateClusterOperator(
Expand All @@ -100,7 +100,14 @@
# [END how_to_cloud_dataproc_delete_cluster_operator]
delete_cluster.trigger_rule = TriggerRule.ALL_DONE

create_cluster >> hive_task >> delete_cluster
(
# TEST SETUP
create_cluster
# TEST BODY
>> hive_task
# TEST TEARDOWN
>> delete_cluster
)

from tests.system.utils.watcher import watcher

Expand Down

0 comments on commit e828773

Please sign in to comment.
  翻译: