From efca5dc5b51ac0df97b5fde693320bfdc7c392ee Mon Sep 17 00:00:00 2001 From: uiro-bi Date: Mon, 17 Jun 2024 09:25:52 -0300 Subject: [PATCH] fix: insert pre hook in br_ms_sih models --- models/br_ms_sih/br_ms_sih__aihs_reduzidas.sql | 1 + models/br_ms_sih/br_ms_sih__servicos_profissionais.sql | 1 + 2 files changed, 2 insertions(+) diff --git a/models/br_ms_sih/br_ms_sih__aihs_reduzidas.sql b/models/br_ms_sih/br_ms_sih__aihs_reduzidas.sql index 5f298f17..cd0b1e5d 100644 --- a/models/br_ms_sih/br_ms_sih__aihs_reduzidas.sql +++ b/models/br_ms_sih/br_ms_sih__aihs_reduzidas.sql @@ -9,6 +9,7 @@ "range": {"start": 2008, "end": 2024, "interval": 1}, }, cluster_by=["mes", "sigla_uf"], + pre_hook="DROP ALL ROW ACCESS POLICIES ON {{ this }}", ) }} select diff --git a/models/br_ms_sih/br_ms_sih__servicos_profissionais.sql b/models/br_ms_sih/br_ms_sih__servicos_profissionais.sql index caf288ce..67a4d80d 100644 --- a/models/br_ms_sih/br_ms_sih__servicos_profissionais.sql +++ b/models/br_ms_sih/br_ms_sih__servicos_profissionais.sql @@ -9,6 +9,7 @@ "range": {"start": 2005, "end": 2024, "interval": 1}, }, cluster_by=["mes", "sigla_uf"], + pre_hook="DROP ALL ROW ACCESS POLICIES ON {{ this }}", ) }}