Hacker News new | past | comments | ask | show | jobs | submit login

The dbt site describes this as a simple example:

    select * from {{ref('really_big_table')}}
    
    {% if incremental and target.schema == 'prod' %}
      where timestamp >= (select max(timestamp) from {{this}})
     {% else %}
      where timestamp >= dateadd(day, -3, current_date)
    {% endif %}



As someone who has written 100s (maybe 1000s at this point) of DBT models, the amount of Jinja you need is at most 1-2% of the codebase.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: