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 4f91931b35 Provide more context for `trigger_reason` in
DbtCloudRunJobOperator (#28994)
4f91931b35 is described below
commit 4f91931b359f76ae38272c727bfe21a18a470f2b
Author: Josh Fell <[email protected]>
AuthorDate: Tue Jan 17 17:07:53 2023 -0500
Provide more context for `trigger_reason` in DbtCloudRunJobOperator (#28994)
Users may be confused when comparing the dbt API and the Python API docs
for the DbtCloudRunJobOperator re: to `trigger_reason`. This value is required
for the dbt API but not for the operator. The operator will handle providing a
default value. Adding the default value in the `trigger_reason` param docstring
so users have additional context when reading the Python API doc for the
operator.
---
airflow/providers/dbt/cloud/operators/dbt.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/airflow/providers/dbt/cloud/operators/dbt.py
b/airflow/providers/dbt/cloud/operators/dbt.py
index 6f8080097b..472b2ffa7f 100644
--- a/airflow/providers/dbt/cloud/operators/dbt.py
+++ b/airflow/providers/dbt/cloud/operators/dbt.py
@@ -50,6 +50,7 @@ class DbtCloudRunJobOperator(BaseOperator):
:param job_id: The ID of a dbt Cloud job.
:param account_id: Optional. The ID of a dbt Cloud account.
:param trigger_reason: Optional. Description of the reason to trigger the
job.
+ Defaults to "Triggered via Apache Airflow by task <task_id> in the
<dag_id> DAG."
:param steps_override: Optional. List of dbt commands to execute when
triggering the job instead of those
configured in dbt Cloud.
:param schema_override: Optional. Override the destination schema in the
configured target for this job.