# Exclude tag at model level

**URL:** <https://discourse.getdbt.com/t/exclude-tag-at-model-level/16625>\
**Category:** Help\
**Tags:** best-practice, dbt-core\
**Created:** [October 17, 2024, 1:31pm UTC](https://discourse.getdbt.com/t/exclude-tag-at-model-level/16625 "2024-10-17T13:31:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![j.trudel](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@j.trudel](https://discourse.getdbt.com/u/j.trudel)\
**Post date:** [October 17, 2024, 1:31pm UTC](https://discourse.getdbt.com/t/exclude-tag-at-model-level/16625/1 "2024-10-17T13:31:33Z")

</div>

Hi! I just wanted to know if there was any way to exclude a tag at a model level. From my understanding, tags are additive, so if I have the following structure:  
Top  
|\_\_ A.sql  
|\_\_ B.sql  
|\_\_ C.sql  
|\_\_ […]

And I had a tag ‘daily’ on the directory Dir, which let me know that all of the models inside Dir are to be run daily . Let’s say that For A specifically, I wanted it to be run weekly instead. If I were to add the tag ‘weekly’ in A’s config, my understanding is that it would end up with tags [‘daily’, ‘weekly’].

Is there any way in the config file that I could both add the tag ‘weekly’, but also remove the tag ‘daily’ for that model in particular?

I know there are probably workarounds I can do, but I was curious to know if tag substraction specifically was supported. Thanks!

---

<div class="post-metadata">

**Author:** ![a\_slack\_user](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/a_slack_user/32/1629_2.png) [@a\_slack\_user](https://discourse.getdbt.com/u/a_slack_user)\
**Post date:** [October 17, 2024, 3:02pm UTC](https://discourse.getdbt.com/t/exclude-tag-at-model-level/16625/2 "2024-10-17T15:02:34Z")

</div>

you’re correct that tags are additive, and there’s not a method I’m aware of to exclude a `dbt_project.yml` tag in within a model config.

to handle this situation, you could break the models out into `daily` & `weekly` sub-directories within the current directory path they live in so that you are still able to keep the run-time tags within the `dbt-project.yml`. I think this approach is fairly common.

Note: `@Sean Meehan` originally [posted this reply in Slack](https://getdbt.slack.com/archives/CBSQTAPLG/p1729177335963689?thread_ts=1729171932.665619&cid=CBSQTAPLG). It might not have transferred perfectly.

---

<div class="post-metadata">

**Author:** ![a\_slack\_user](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/a_slack_user/32/1629_2.png) [@a\_slack\_user](https://discourse.getdbt.com/u/a_slack_user)\
**Post date:** [October 17, 2024, 4:26pm UTC](https://discourse.getdbt.com/t/exclude-tag-at-model-level/16625/3 "2024-10-17T16:26:54Z")

</div>

My approach is pretty awful, but… in Airflow my logic is that if it’s not Monday, --exclude tag:weekly.  
(I run my weeklies on Monday due to our reporting week being Monday through Sunday)

Note: `@Renee` originally [posted this reply in Slack](https://getdbt.slack.com/archives/CBSQTAPLG/p1729182406442089?thread_ts=1729171932.665619&cid=CBSQTAPLG). It might not have transferred perfectly.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/getdbt/original/1X/a7a7ca1fe379aaf90952b0e13118a817babcd14f.png) [@system](https://discourse.getdbt.com/u/system)\
**Post date:** [October 24, 2024, 4:27pm UTC](https://discourse.getdbt.com/t/exclude-tag-at-model-level/16625/4 "2024-10-24T16:27:28Z")

</div>

Closed on October 24, 2024, 4:27pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
