-
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.
- Loading branch information
Showing
11 changed files
with
895 additions
and
67 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
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 |
---|---|---|
@@ -1,9 +1,22 @@ | ||
{{ config(alias="itr", schema="br_rf_arrecadacao") }} | ||
{{ | ||
config( | ||
schema="br_rf_arrecadacao", | ||
alias="itr", | ||
materialized="table", | ||
partition_by={ | ||
"field": "ano", | ||
"data_type": "int64", | ||
"range": {"start": 2017, "end": 2024, "interval": 1}, | ||
}, | ||
cluster_by=["mes"], | ||
) | ||
}} | ||
|
||
select | ||
safe_cast(ano as int64) ano, | ||
safe_cast(mes as int64) mes, | ||
safe_cast(nome_uf as string) nome_uf, | ||
safe_cast(regiao_politica as string) regiao_politica, | ||
safe_cast(cidade_uf as string) cidade_uf, | ||
safe_cast(sigla_uf as string) sigla_uf, | ||
safe_cast(sigla_regiao as string) sigla_regiao, | ||
safe_cast(cidade as string) cidade, | ||
safe_cast(valor_arrecadado as float64) valor_arrecadado, | ||
from `basedosdados-staging.br_rf_arrecadacao_staging.itr` as t | ||
from `basedosdados-dev.br_rf_arrecadacao_staging.itr` 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
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
Oops, something went wrong.