diff --git a/models/mundo_transfermarkt_competicoes/mundo_transfermarkt_competicoes__copa_brasil.sql b/models/mundo_transfermarkt_competicoes/mundo_transfermarkt_competicoes__copa_brasil.sql index 0aa16265..82051ea1 100644 --- a/models/mundo_transfermarkt_competicoes/mundo_transfermarkt_competicoes__copa_brasil.sql +++ b/models/mundo_transfermarkt_competicoes/mundo_transfermarkt_competicoes__copa_brasil.sql @@ -15,11 +15,11 @@ post_hook = ['CREATE OR REPLACE ROW ACCESS POLICY allusers_filter ON {{this}} GRANT TO ("allUsers") - FILTER USING (DATE_DIFF(DATE("{{ run_started_at.strftime("%Y-%m-%d") }}"), DATE(data), YEAR) > 1)', + FILTER USING (DATE_DIFF(DATE("{{ run_started_at.strftime("%Y-%m-%d") }}"), DATE(data), MONTH) > 6)', 'CREATE OR REPLACE ROW ACCESS POLICY bdpro_filter ON {{this}} GRANT TO ("group:bd-pro@basedosdados.org", "group:sudo@basedosdados.org") - FILTER USING (DATE_DIFF(DATE("{{ run_started_at.strftime("%Y-%m-%d") }}"), DATE(data), YEAR) <= 1)' ] + FILTER USING (DATE_DIFF(DATE("{{ run_started_at.strftime("%Y-%m-%d") }}"), DATE(data), MONTH) <= 6)' ] ) }}