This is an automated email from the ASF dual-hosted git repository.
joshfell pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new a90ab6e3158 Change operator DbtCloudRunJobOperator to send job_run_id
to XCom (#55184)
a90ab6e3158 is described below
commit a90ab6e3158fbf279d9a3085292cf074c2c96879
Author: AardJan <[email protected]>
AuthorDate: Tue Sep 2 18:30:30 2025 +0200
Change operator DbtCloudRunJobOperator to send job_run_id to XCom (#55184)
---
.../dbt/cloud/src/airflow/providers/dbt/cloud/operators/dbt.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
a/providers/dbt/cloud/src/airflow/providers/dbt/cloud/operators/dbt.py
b/providers/dbt/cloud/src/airflow/providers/dbt/cloud/operators/dbt.py
index 882cd9073c0..03492a0b23c 100644
--- a/providers/dbt/cloud/src/airflow/providers/dbt/cloud/operators/dbt.py
+++ b/providers/dbt/cloud/src/airflow/providers/dbt/cloud/operators/dbt.py
@@ -192,9 +192,11 @@ class DbtCloudRunJobOperator(BaseOperator):
self.run_id = trigger_job_response.json()["data"]["id"]
job_run_url = trigger_job_response.json()["data"]["href"]
- # Push the ``job_run_url`` value to XCom regardless of what happens
during execution so that the job
- # run can be monitored via the operator link.
+ # Push the ``job_run_url`` and ``job_run_id`` value to XCom regardless
of what happens during execution.
+ # This enables job monitoring via the operator link and provides
direct access
+ # to the job run ID without requiring users to parse the URL manually
context["ti"].xcom_push(key="job_run_url", value=job_run_url)
+ context["ti"].xcom_push(key="job_run_id", value=self.run_id)
if self.wait_for_termination and isinstance(self.run_id, int):
if self.deferrable is False: