diff --git a/models/br_me_caged/microdados_movimentacao.sql b/models/br_me_caged/microdados_movimentacao.sql index cb7648d3..5bf0011d 100644 --- a/models/br_me_caged/microdados_movimentacao.sql +++ b/models/br_me_caged/microdados_movimentacao.sql @@ -5,13 +5,13 @@ partition_by={ "field": "ano", "data_type": "int64", - "range": {"start": 2020, "end": 2023, "interval": 1}, + "range": {"start": 2020, "end": 2024, "interval": 1}, }, cluster_by=["mes", "sigla_uf"], labels={"project_id": "basedosdados", "tema": "economia"}, pre_hook="DROP ALL ROW ACCESS POLICIES ON {{ this }}", post_hook=[ - 'CREATE OR REPLACE ROW ACCESS POLICY allusers_filter ON {{this}} GRANT TO ("allUsers") FILTER USING (DATE_DIFF(DATE(2024,1,30),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 allusers_filter ON {{this}} GRANT TO ("allUsers") FILTER USING (DATE_DIFF(DATE(2024,3,18),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") FILTER USING (True)', ], ) diff --git a/models/br_me_caged/microdados_movimentacao_excluida.sql b/models/br_me_caged/microdados_movimentacao_excluida.sql index f35e174c..5e13628f 100644 --- a/models/br_me_caged/microdados_movimentacao_excluida.sql +++ b/models/br_me_caged/microdados_movimentacao_excluida.sql @@ -5,13 +5,13 @@ partition_by={ "field": "ano", "data_type": "int64", - "range": {"start": 2020, "end": 2023, "interval": 1}, + "range": {"start": 2020, "end": 2024, "interval": 1}, }, cluster_by=["mes", "sigla_uf"], labels={"project_id": "basedosdados", "tema": "economia"}, pre_hook="DROP ALL ROW ACCESS POLICIES ON {{ this }}", post_hook=[ - 'CREATE OR REPLACE ROW ACCESS POLICY allusers_filter ON {{this}} GRANT TO ("allUsers") FILTER USING (DATE_DIFF(DATE(2024,1,30),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 allusers_filter ON {{this}} GRANT TO ("allUsers") FILTER USING (DATE_DIFF(DATE(2024,3,18),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") FILTER USING (True)', ], ) diff --git a/models/br_me_caged/microdados_movimentacao_fora_prazo.sql b/models/br_me_caged/microdados_movimentacao_fora_prazo.sql index 2cd3efa4..2645885c 100644 --- a/models/br_me_caged/microdados_movimentacao_fora_prazo.sql +++ b/models/br_me_caged/microdados_movimentacao_fora_prazo.sql @@ -5,13 +5,13 @@ partition_by={ "field": "ano", "data_type": "int64", - "range": {"start": 2020, "end": 2023, "interval": 1}, + "range": {"start": 2020, "end": 2024, "interval": 1}, }, cluster_by=["mes", "sigla_uf"], labels={"project_id": "basedosdados", "tema": "economia"}, pre_hook="DROP ALL ROW ACCESS POLICIES ON {{ this }}", post_hook=[ - 'CREATE OR REPLACE ROW ACCESS POLICY allusers_filter ON {{this}} GRANT TO ("allUsers") FILTER USING (DATE_DIFF(DATE(2024,1,30),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 allusers_filter ON {{this}} GRANT TO ("allUsers") FILTER USING (DATE_DIFF(DATE(2024,3,18),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") FILTER USING (True)', ], )