Код: Выделить всё
{{
config(
post_hook=[
'{{ execute_if_exists("delete from " ~ this ~ " where day = date('' " ~ var("mydatevar") ~ " '')") }}',
]
)
}}
Код: Выделить всё
{% macro execute_if_exists(query) -%}
{{ query }}
{%- endmacro %}
Код: Выделить всё
delete from catalog.myschema.mytable where day = date( 2024-10-02 )
Код: Выделить всё
delete from catalog.myschema.mytable where day = date(' 2024-10-02 ')
Подробнее здесь: https://stackoverflow.com/questions/790 ... with-jinja