add macro

This commit is contained in:
stanz 2025-12-08 21:29:51 +07:00
parent eaf0afb8ac
commit 1e5ce625f9

View File

@ -0,0 +1,12 @@
{% macro unverify_tokens() %}
{% if var('HEAL_MODEL', false) and is_incremental() %}
DELETE FROM {{ this }}
WHERE LOWER(token_address) NOT IN (
SELECT DISTINCT LOWER(token_address)
FROM {{ ref('price__ez_prices_hourly') }}
WHERE
is_verified = TRUE
AND token_address IS NOT NULL
);
{% endif %}
{% endmacro %}