# Running dbt tests on sources in airflow

**URL:** <https://discourse.getdbt.com/t/running-dbt-tests-on-sources-in-airflow/12153>\
**Category:** Help\
**Created:** [February 21, 2024, 3:55pm UTC](https://discourse.getdbt.com/t/running-dbt-tests-on-sources-in-airflow/12153 "2024-02-21T15:55:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![batman\_007](https://avatars.discourse-cdn.com/v4/letter/b/b5e925/32.png) [@batman\_007](https://discourse.getdbt.com/u/batman_007)\
**Post date:** [February 21, 2024, 3:55pm UTC](https://discourse.getdbt.com/t/running-dbt-tests-on-sources-in-airflow/12153/1 "2024-02-21T15:55:01Z")

</div>

## Hello, i’m trying to run dbt tests on sources in airflow. What i’ve tried is using DbtTaskGroup operator but it seems like it only runs the tests on models, is there a way to also use this operator for running tests on sources?

## I want to run them on sources because i don’t want fo recreate every table in warehouse as model.

---

<div class="post-metadata">

**Author:** ![minhajpasha](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/minhajpasha/32/1159_2.png) [@minhajpasha](https://discourse.getdbt.com/u/minhajpasha)\
**Post date:** [February 22, 2024, 3:32pm UTC](https://discourse.getdbt.com/t/running-dbt-tests-on-sources-in-airflow/12153/2 "2024-02-22T15:32:16Z")

</div>

@batman_007 . You can create generic test and attach into source table.

for Eg:

- Create generic folder under test and write your test SQL model.  
tests/generic/data\_count\_check.sql

- data\_count\_check.sql

- schema.yml file

- dbt test --select tag:data\_count\_dq\_check

Hope this helps !!
