-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into staging/br_mercadolivre_ofertas.vendedor
- Loading branch information
Showing
4 changed files
with
81 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
models/br_bcb_agencia/br_bcb_agencia__agencia_atualizado.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{{ config( | ||
alias = 'agencia_atualizado', | ||
schema = 'br_bcb_agencia', | ||
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"']) | ||
}} | ||
|
||
|
||
|
||
SELECT | ||
SAFE_CAST(ano AS INT64) ano, | ||
SAFE_CAST(mes AS INT64) mes, | ||
SAFE_CAST(sigla_uf AS STRING) sigla_uf, | ||
SAFE_CAST(id_municipio AS STRING) id_municipio, | ||
SAFE_CAST(data_inicio AS DATE) data_inicio, | ||
SAFE_CAST(cnpj AS STRING) cnpj, | ||
SAFE_CAST(nome_agencia AS STRING) nome_agencia, | ||
SAFE_CAST(instituicao AS STRING) instituicao, | ||
SAFE_CAST(segmento AS STRING) segmento, | ||
SAFE_CAST(id_compe_bcb_agencia AS STRING) id_compe_bcb_agencia, | ||
SAFE_CAST(id_compe_bcb_instituicao AS STRING) id_compe_bcb_instituicao, | ||
SAFE_CAST(cep AS STRING) cep, | ||
SAFE_CAST(endereco AS STRING) endereco, | ||
SAFE_CAST(complemento AS STRING) complemento, | ||
SAFE_CAST(bairro AS STRING) bairro, | ||
SAFE_CAST(ddd AS STRING) ddd, | ||
SAFE_CAST(fone AS STRING) fone, | ||
SAFE_CAST(id_instalacao AS STRING) id_instalacao | ||
FROM basedosdados-staging.br_bcb_agencia_staging.agencia AS t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters