jason810496 commented on code in PR #48466:
URL: https://github.com/apache/airflow/pull/48466#discussion_r2072298390


##########
providers/dbt/cloud/src/airflow/providers/dbt/cloud/hooks/dbt.py:
##########
@@ -135,6 +135,63 @@ class DbtCloudJobRunException(AirflowException):
     """An exception that indicates a job run failed to complete."""
 
 
+class DbtCloudJobRunDetailsException(AirflowException):
+    """
+    An exception that indicates a job run failed to complete.
+
+    Provides additional job run details.
+    """
+
+    def __init__(self, run_id: int, run_details: dict):
+        self.run_id = run_id
+        self.run_details = run_details
+
+    def __str__(self):
+        # For extracting only a subset of the higher level job details
+        # id is the run_id
+        run_data_keys = [
+            "id",
+            "job_id",
+            "is_error",
+            "dbt_version",
+            "finished_at",
+            "finished_at_humanized",
+            "run_duration",
+            "run_duration_humanized",
+        ]
+        # For extracting only a subset of the run step details
+        # id is the step id
+        run_steps_keys = [
+            "run_id",
+            "id",
+            "index",
+            "name",
+            "status",
+            "status_humanized",
+            "duration",
+            "duration_humanized",
+            "logs",
+            "debug_logs",
+        ]

Review Comment:
   Sorry for the late reply, I means the class attributes.
   Just to move `run_data_keys `, `run_steps_keys` variables to `self.run_*` 
attributes.



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