shahar1 commented on code in PR #64900:
URL: https://github.com/apache/airflow/pull/64900#discussion_r3108077071


##########
providers/google/src/airflow/providers/google/cloud/operators/dataflow.py:
##########
@@ -1176,3 +1181,286 @@ def execute(self, context: Context):
             raise AirflowException(self.response)
 
         return None
+
+class DataflowGetMetricsOperator(GoogleCloudBaseOperator):
+    """
+    Fetches metrics for a Dataflow job and routes the result to one or more
+    destinations based on what the caller provides.

Review Comment:
   I'm a bit concerned of mixing up fetching metrics **and** inserting them to 
PubSub or BQ altogether - it's a lot of actions for a single operator, that 
could be utilized by other existing operators.
   Please refactor so after fetching metrics - it just returns them into an 
XCom (and later they could be routed to PubSub/BQ using the appropriate 
operators).



##########
providers/google/src/airflow/providers/google/cloud/operators/dataflow.py:
##########
@@ -1176,3 +1181,286 @@ def execute(self, context: Context):
             raise AirflowException(self.response)
 
         return None
+
+class DataflowGetMetricsOperator(GoogleCloudBaseOperator):

Review Comment:
   ```suggestion
   class DataflowJobMetricsOperator(GoogleCloudBaseOperator):
   ```
   
   Rename to be consistent with existing sensor & trigger



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

To unsubscribe, e-mail: [email protected]

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

Reply via email to