From ed2dbcff2d6cf9c6080358b40e3fa8c4d9a16546 Mon Sep 17 00:00:00 2001 From: technomonah Date: Fri, 13 Oct 2023 09:18:01 +0000 Subject: [PATCH] BI 4038 add post hooks to icremental and live Added post hooks run once inside transaction at the end of incremental and live materialization. This hooks would run only if they specified in config. Needed in https://improvado.atlassian.net/browse/BI-4038 to specify table TTL --- macros/incremental_and_live.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/macros/incremental_and_live.sql b/macros/incremental_and_live.sql index 4e1e263..7520ebc 100644 --- a/macros/incremental_and_live.sql +++ b/macros/incremental_and_live.sql @@ -578,6 +578,9 @@ -- append output relation {%- do sections_arr.append(target_output_relation) -%} -- + -- run post hooks + {{ run_hooks(post_hooks, inside_transaction=True) }} + -- return {% call noop_statement('main', 'Done') -%} {%- endcall %} {% do return ({'relations': sections_arr}) -%}