mirror of
https://github.com/FlipsideCrypto/near-models.git
synced 2026-02-06 11:26:52 +00:00
9 lines
293 B
SQL
9 lines
293 B
SQL
{% macro incremental_load_filter(time_col) -%}
|
|
-- dbt makes it easy to query your target table by using the "{{ this }}" variable.
|
|
{% if is_incremental() %}
|
|
{{ time_col }} > (select max({{ time_col }}) from {{ this }})
|
|
{%- else -%}
|
|
true
|
|
{% endif %}
|
|
{%- endmacro %}
|