I’ll often insert some jinja logic into a model’s SQL file in order to limit the amount of data being used for a dbt run:
select *
from source('web_events', 'page_views')
{% if target.name == 'dev' %}
where created_at >= dateadd('day', -3, current_date)
{% endif %}
This isn’t very DRY as I want to apply this across the entire dbt project. Is there a better way to accomplish this logic throughout the project without having to add this jinja block to each SQL model?