From a1989752be68fc756f9e53390b59acaaac9c2130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Gusm=C3=A3o?= Date: Mon, 8 Jan 2024 10:01:45 -0300 Subject: [PATCH] feat(update): caged 11-23 update --- models/br_me_caged/microdados_movimentacao.sql | 2 +- models/br_me_caged/microdados_movimentacao_excluida.sql | 2 +- models/br_me_caged/microdados_movimentacao_fora_prazo.sql | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/models/br_me_caged/microdados_movimentacao.sql b/models/br_me_caged/microdados_movimentacao.sql index a3a69d71..ab5bebfa 100644 --- a/models/br_me_caged/microdados_movimentacao.sql +++ b/models/br_me_caged/microdados_movimentacao.sql @@ -17,7 +17,7 @@ 'CREATE OR REPLACE ROW ACCESS POLICY allusers_filter ON {{this}} GRANT TO ("allUsers") - FILTER USING (DATE_DIFF(DATE(2023,12,6),DATE(CAST(ano AS INT64),CAST(mes AS INT64),1), MONTH) > 6 OR DATE_DIFF(DATE(2023,5,1),DATE(CAST(ano AS INT64),CAST(mes AS INT64),1), MONTH) > 0)', + FILTER USING (DATE_DIFF(DATE(2024,1,8),DATE(CAST(ano AS INT64),CAST(mes AS INT64),1), MONTH) > 6 OR DATE_DIFF(DATE(2023,5,1),DATE(CAST(ano AS INT64),CAST(mes AS INT64),1), MONTH) > 0)', 'CREATE OR REPLACE ROW ACCESS POLICY bdpro_filter ON {{this}} GRANT TO ("group:bd-pro@basedosdados.org", "group:sudo@basedosdados.org") diff --git a/models/br_me_caged/microdados_movimentacao_excluida.sql b/models/br_me_caged/microdados_movimentacao_excluida.sql index b1f6be11..4a5bc0e3 100644 --- a/models/br_me_caged/microdados_movimentacao_excluida.sql +++ b/models/br_me_caged/microdados_movimentacao_excluida.sql @@ -17,7 +17,7 @@ 'CREATE OR REPLACE ROW ACCESS POLICY allusers_filter ON {{this}} GRANT TO ("allUsers") - FILTER USING (DATE_DIFF(DATE(2023,12,6),DATE(CAST(ano AS INT64),CAST(mes AS INT64),1), MONTH) > 6 OR DATE_DIFF(DATE(2023,5,1),DATE(CAST(ano AS INT64),CAST(mes AS INT64),1), MONTH) > 0)', + FILTER USING (DATE_DIFF(DATE(2024,1,8),DATE(CAST(ano AS INT64),CAST(mes AS INT64),1), MONTH) > 6 OR DATE_DIFF(DATE(2023,5,1),DATE(CAST(ano AS INT64),CAST(mes AS INT64),1), MONTH) > 0)', 'CREATE OR REPLACE ROW ACCESS POLICY bdpro_filter ON {{this}} GRANT TO ("group:bd-pro@basedosdados.org", "group:sudo@basedosdados.org") diff --git a/models/br_me_caged/microdados_movimentacao_fora_prazo.sql b/models/br_me_caged/microdados_movimentacao_fora_prazo.sql index b93e8801..c55111d2 100644 --- a/models/br_me_caged/microdados_movimentacao_fora_prazo.sql +++ b/models/br_me_caged/microdados_movimentacao_fora_prazo.sql @@ -17,7 +17,7 @@ 'CREATE OR REPLACE ROW ACCESS POLICY allusers_filter ON {{this}} GRANT TO ("allUsers") - FILTER USING (DATE_DIFF(DATE(2023,12,6),DATE(CAST(ano AS INT64),CAST(mes AS INT64),1), MONTH) > 6 OR DATE_DIFF(DATE(2023,5,1),DATE(CAST(ano AS INT64),CAST(mes AS INT64),1), MONTH) > 0)', + FILTER USING (DATE_DIFF(DATE(2024,1,8),DATE(CAST(ano AS INT64),CAST(mes AS INT64),1), MONTH) > 6 OR DATE_DIFF(DATE(2023,5,1),DATE(CAST(ano AS INT64),CAST(mes AS INT64),1), MONTH) > 0)', 'CREATE OR REPLACE ROW ACCESS POLICY bdpro_filter ON {{this}} GRANT TO ("group:bd-pro@basedosdados.org", "group:sudo@basedosdados.org")