turbaszek commented on a change in pull request #10847:
URL: https://github.com/apache/airflow/pull/10847#discussion_r486148270



##########
File path: airflow/providers/google/cloud/operators/dataproc.py
##########
@@ -1808,6 +1808,8 @@ def __init__(
         gcp_conn_id: str = "google_cloud_default",
         impersonation_chain: Optional[Union[str, Sequence[str]]] = None,
         asynchronous: bool = False,
+        hook: Optional[DataprocHook] = None,

Review comment:
       The general idea is that operators should initialize the hook in execute 
methods. What users should pass in operators constructor is parameters for hook 
initialization (in this case `gcp_conn_id` and `impersonation_chain`).
   
   This operator can use only `DataprocHook` using any other hook may result in 
strange errors. Recommended way to to create "custom behavior" in Airflow is 
creating new operators.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to