added incremental logic on velodrome cte

This commit is contained in:
drethereum 2023-05-01 14:18:24 -06:00
parent 77b1a4cbb4
commit 8537f366b1

View File

@ -180,6 +180,15 @@ velodrome_swaps AS (
FROM
{{ ref('velodrome__ez_swaps') }}
s
{% if is_incremental() %}
WHERE
block_timestamp >= (
SELECT
MAX(block_timestamp) :: DATE - 7
FROM
{{ this }}
)
{% endif %}
),
sushi_swaps AS (
SELECT