From 316ae9427a0e7215bfe26820dfe8c8fa3db5eb7c Mon Sep 17 00:00:00 2001 From: Laura Amaral Date: Fri, 28 Jul 2023 09:34:04 -0300 Subject: [PATCH 1/4] add updated tables --- dbt_project.yml | 25 +++--- .../brasileirao_serie_a.sql | 13 +-- .../brasileirao_serie_a_atualizado.sql | 54 ++++++++++++ .../schema.yml | 86 ++++++++++++++++++- 4 files changed, 157 insertions(+), 21 deletions(-) create mode 100644 models/mundo_transfermarkt_competicoes/brasileirao_serie_a_atualizado.sql diff --git a/dbt_project.yml b/dbt_project.yml index 53619bef..7247662b 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -112,6 +112,15 @@ models: br_me_comex_stat: +materialized: table +schema: br_me_comex_stat + br_mercadolivre_ofertas: + +materialized: table + +schema: br_mercadolivre_ofertas + +post-hook: + - 'REVOKE `roles/bigquery.dataViewer` ON TABLE {{ this }} FROM "specialGroup:allUsers"' + - 'GRANT `roles/bigquery.dataViewer` ON TABLE {{ this }} TO "group:bd-pro@basedosdados.org"' + br_ms_cnes: + +materialized: table + +schema: br_ms_cnes br_ons_avaliacao_operacao: +materialized: table +schema: br_ons_avaliacao_operacao @@ -151,21 +160,7 @@ models: mundo_transfermarkt_competicoes: +materialized: table +schema: mundo_transfermarkt_competicoes - +post-hook: - - 'CREATE OR REPLACE ROW ACCESS POLICY allusers_filter - ON {{this}} - GRANT TO ("allUsers") - FILTER USING ( (EXTRACT(WEEK from data) <= (EXTRACT( WEEK from CURRENT_DATE())-6) ) OR ano_campeonato Date: Fri, 28 Jul 2023 09:37:07 -0300 Subject: [PATCH 2/4] remove competicoes posthook --- dbt_project.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dbt_project.yml b/dbt_project.yml index 7247662b..a2615b0f 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -55,12 +55,18 @@ models: +post-hook: - 'REVOKE `roles/bigquery.dataViewer` ON TABLE {{ this }} FROM "specialGroup:allUsers"' - 'GRANT `roles/bigquery.dataViewer` ON TABLE {{ this }} TO "group:bd-pro@basedosdados.org"' + br_bcb_agencia: + +materialized: table + +schema: br_bcb_agencia br_bcb_estban: +materialized: table +schema: br_bcb_estban br_bd_diretorios_brasil: +materialized: table +schema: br_bd_diretorios_brasil + br_bd_diretorios_mundo: + +materialized: table + +schema: br_bd_diretorios_mundo br_bd_indicadores: +materialized: table +schema: br_bd_indicadores @@ -70,6 +76,9 @@ models: br_cgu_pessoal_executivo_federal: +materialized: table +schema: br_cgu_pessoal_executivo_federal + br_cnpq_bolsas: + +materialized: table + +schema: br_cnpq_bolsas br_cvm_administradores_carteira: +materialized: table +schema: br_cvm_administradores_carteira @@ -162,5 +171,4 @@ models: +schema: mundo_transfermarkt_competicoes test_dataset: +materialized: table - +schema: test_dataset - + +schema: test_dataset \ No newline at end of file From b88bcc22354cf928cce83c0978ed954dca9a8429 Mon Sep 17 00:00:00 2001 From: Laura Amaral Date: Fri, 28 Jul 2023 14:34:45 -0300 Subject: [PATCH 3/4] change labels --- models/mundo_transfermarkt_competicoes/brasileirao_serie_a.sql | 2 +- .../brasileirao_serie_a_atualizado.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/mundo_transfermarkt_competicoes/brasileirao_serie_a.sql b/models/mundo_transfermarkt_competicoes/brasileirao_serie_a.sql index 8e68cc13..c4e1988a 100644 --- a/models/mundo_transfermarkt_competicoes/brasileirao_serie_a.sql +++ b/models/mundo_transfermarkt_competicoes/brasileirao_serie_a.sql @@ -10,7 +10,7 @@ "end": 2023, "interval": 1} }, - labels = {'project_id': 'basedosdados-dev'}, + labels = {'tema': 'esporte'}, ) }} SELECT diff --git a/models/mundo_transfermarkt_competicoes/brasileirao_serie_a_atualizado.sql b/models/mundo_transfermarkt_competicoes/brasileirao_serie_a_atualizado.sql index e0610729..fb14f2a4 100644 --- a/models/mundo_transfermarkt_competicoes/brasileirao_serie_a_atualizado.sql +++ b/models/mundo_transfermarkt_competicoes/brasileirao_serie_a_atualizado.sql @@ -10,7 +10,7 @@ "end": 2023, "interval": 1} }, - labels = {'project_id': 'basedosdados-dev'}, + labels = {'tema': 'esporte'}, post_hook=['REVOKE `roles/bigquery.dataViewer` ON TABLE {{ this }} FROM "specialGroup:allUsers"', 'GRANT `roles/bigquery.dataViewer` ON TABLE {{ this }} TO "group:bd-pro@basedosdados.org"']) }} From 94deab3a421b4d030db90dbdce58a25e244a94c3 Mon Sep 17 00:00:00 2001 From: Laura Amaral Date: Fri, 28 Jul 2023 14:35:33 -0300 Subject: [PATCH 4/4] remove extra comma --- models/mundo_transfermarkt_competicoes/brasileirao_serie_a.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/mundo_transfermarkt_competicoes/brasileirao_serie_a.sql b/models/mundo_transfermarkt_competicoes/brasileirao_serie_a.sql index c4e1988a..eea85348 100644 --- a/models/mundo_transfermarkt_competicoes/brasileirao_serie_a.sql +++ b/models/mundo_transfermarkt_competicoes/brasileirao_serie_a.sql @@ -10,7 +10,7 @@ "end": 2023, "interval": 1} }, - labels = {'tema': 'esporte'}, + labels = {'tema': 'esporte'} ) }} SELECT