From 94e417459e34d333ac8e703d7c20307c90af2a6b Mon Sep 17 00:00:00 2001 From: Amisha Singla Date: Wed, 18 Sep 2024 23:14:18 +0530 Subject: [PATCH] Pass is_singular_airflow_task env var --- dags/dbt_singular_tests_dag.py | 1 + dags/stellar_etl_airflow/build_dbt_task.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/dags/dbt_singular_tests_dag.py b/dags/dbt_singular_tests_dag.py index bb828870..ad80b7a8 100644 --- a/dags/dbt_singular_tests_dag.py +++ b/dags/dbt_singular_tests_dag.py @@ -34,6 +34,7 @@ command_type="test", tag="singular_test", resource_cfg="dbt", + run_singular_test="true" ) singular_tests diff --git a/dags/stellar_etl_airflow/build_dbt_task.py b/dags/stellar_etl_airflow/build_dbt_task.py index e9f36563..13a19bf2 100644 --- a/dags/stellar_etl_airflow/build_dbt_task.py +++ b/dags/stellar_etl_airflow/build_dbt_task.py @@ -67,6 +67,7 @@ def dbt_task( command_type="build", excluded=None, resource_cfg="default", + run_singular_test="false" ): namespace = conf.get("kubernetes", "NAMESPACE") if namespace == "default": @@ -134,6 +135,7 @@ def dbt_task( "PUBLIC_SOURCE_SCHEMA": "{{ var.value.dbt_public_source_schema }}", "EXECUTION_DATE": "{{ ts }}", "AIRFLOW_START_TIMESTAMP": "{{ ti.start_date.strftime('%Y-%m-%dT%H:%M:%SZ') }}", + "IS_SINGULAR_AIRFLOW_TASK": run_singular_test, }, image=dbt_image, arguments=args,