-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update airflow resources and split out dbt tests and alerts (#433)
Update airflow resources and split out dbt tests and alerts
- Loading branch information
Showing
6 changed files
with
74 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
from datetime import datetime | ||
|
||
from airflow import DAG | ||
from airflow.operators.empty import EmptyOperator | ||
from kubernetes.client import models as k8s | ||
from stellar_etl_airflow.build_dbt_task import dbt_task | ||
from stellar_etl_airflow.build_elementary_slack_alert_task import elementary_task | ||
from stellar_etl_airflow.default import ( | ||
alert_sla_miss, | ||
get_default_dag_args, | ||
init_sentry, | ||
) | ||
|
||
init_sentry() | ||
|
||
with DAG( | ||
"dbt_singular_tests", | ||
default_args=get_default_dag_args(), | ||
start_date=datetime(2024, 6, 25, 0, 0), | ||
description="This DAG runs non-model dbt tests half-hourly cadence", | ||
schedule="*/30 * * * *", # Runs every 30 minutes | ||
user_defined_filters={ | ||
"container_resources": lambda s: k8s.V1ResourceRequirements(requests=s), | ||
}, | ||
max_active_runs=1, | ||
catchup=False, | ||
tags=["dbt-data-quality"], | ||
# sla_miss_callback=alert_sla_miss, | ||
) as dag: | ||
|
||
# DBT tests to run | ||
singular_tests = dbt_task( | ||
dag, | ||
command_type="test", | ||
tag="singular_test", | ||
resource_cfg="dbt", | ||
) | ||
|
||
singular_tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters