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



##########
File path: airflow/providers/google/cloud/operators/dataprep.py
##########
@@ -35,20 +35,90 @@ class DataprepGetJobsForJobGroupOperator(BaseOperator):
         For more information on how to use this operator, take a look at the 
guide:
         :ref:`howto/operator:DataprepGetJobsForJobGroupOperator`
 
-
     :param job_id The ID of the job that will be requests
     :type job_id: int
     """
 
     template_fields = ("job_id",)
 
     @apply_defaults
-    def __init__(self, *, job_id: int, **kwargs) -> None:
+    def __init__(self, *, dataprep_conn_id: str = "dataprep_default", job_id: 
int, **kwargs) -> None:
         super().__init__(**kwargs)
+        self.dataprep_conn_id = (dataprep_conn_id,)
         self.job_id = job_id
 
     def execute(self, context: Dict):
         self.log.info("Fetching data for job with id: %d ...", self.job_id)
-        hook = GoogleDataprepHook(dataprep_conn_id="dataprep_conn_id")
+        hook = GoogleDataprepHook(dataprep_conn_id="dataprep_default",)
         response = hook.get_jobs_for_job_group(job_id=self.job_id)
         return response
+
+
+class DataprepGetJobGroupOperator(BaseOperator):
+    """
+    Get the specified job group.
+    A job group is a job that is executed from a specific node in a flow.
+    API documentation 
https://clouddataprep.com/documentation/api#section/Overview
+
+    .. seealso::
+        For more information on how to use this operator, take a look at the 
guide:
+        :ref:`howto/operator:DataprepGetJobGroupOperator`
+
+    :param job_group_id The ID of the job that will be requests
+    :type job_group_id: int
+    :param embed Comma-separated list of objects to pull in as part of the 
response
+    :type embed: string
+    :param include_deleted if set to "true", will include deleted objects

Review comment:
       ```suggestion
       :param include_deleted: if set to "true", will include deleted objects
   ```

##########
File path: airflow/providers/google/cloud/operators/dataprep.py
##########
@@ -35,20 +35,90 @@ class DataprepGetJobsForJobGroupOperator(BaseOperator):
         For more information on how to use this operator, take a look at the 
guide:
         :ref:`howto/operator:DataprepGetJobsForJobGroupOperator`
 
-
     :param job_id The ID of the job that will be requests
     :type job_id: int
     """
 
     template_fields = ("job_id",)
 
     @apply_defaults
-    def __init__(self, *, job_id: int, **kwargs) -> None:
+    def __init__(self, *, dataprep_conn_id: str = "dataprep_default", job_id: 
int, **kwargs) -> None:
         super().__init__(**kwargs)
+        self.dataprep_conn_id = (dataprep_conn_id,)
         self.job_id = job_id
 
     def execute(self, context: Dict):
         self.log.info("Fetching data for job with id: %d ...", self.job_id)
-        hook = GoogleDataprepHook(dataprep_conn_id="dataprep_conn_id")
+        hook = GoogleDataprepHook(dataprep_conn_id="dataprep_default",)
         response = hook.get_jobs_for_job_group(job_id=self.job_id)
         return response
+
+
+class DataprepGetJobGroupOperator(BaseOperator):
+    """
+    Get the specified job group.
+    A job group is a job that is executed from a specific node in a flow.
+    API documentation 
https://clouddataprep.com/documentation/api#section/Overview
+
+    .. seealso::
+        For more information on how to use this operator, take a look at the 
guide:
+        :ref:`howto/operator:DataprepGetJobGroupOperator`
+
+    :param job_group_id The ID of the job that will be requests
+    :type job_group_id: int
+    :param embed Comma-separated list of objects to pull in as part of the 
response

Review comment:
       ```suggestion
       :param embed: Comma-separated list of objects to pull in as part of the 
response
   ```




----------------------------------------------------------------
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