build group of models at different runtimes

The problem I’m having

Some of my models need to be run on a daily basis and some on a monthly basis

What I have tried

I can think of different possibilities

  1. create different projects repositories → For me not an option
  2. create different execute commands with different triggers. Example
    dbt build my_daily_models
    dbt build my_monthly_models

The last option sounds good but sounds time consuming since I would have to adapt the run command every time I create or delete models.

What would be the best option ?

We solve this by using tags.
We set tags on our marts including either “hourly”, “daily”, “weekly” or “monthly”

{{ config(
) }}

In your orchestrator, trigger the relevant models with the selector:

dbt build -s +tag:daily
1 Like

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