Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

World wb mides continuation #250

Merged
merged 2 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions models/world_wb_mides/empenho.sql
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ empenhado_mg AS (
SAFE_CAST (CAST(LEFT(dsc_acao, 4) AS INT64) AS STRING) AS acao,
SAFE_CAST (REPLACE(LEFT(elemento_despesa, 12), '.', '') AS STRING) AS elemento_despesa,
ROUND(SAFE_CAST (valor_empenho_original AS FLOAT64),2) AS valor_inicial,
ROUND(SAFE_CAST (IFNULL(valor_reforco,0) AS FLOAT64),2) AS valor_reforco,
ROUND(SAFE_CAST (IFNULL(valor_anulacao,0) AS FLOAT64),2) AS valor_anulacao,
ROUND(SAFE_CAST (valor_reforco AS FLOAT64),2) AS valor_reforco,
ROUND(SAFE_CAST (valor_anulacao AS FLOAT64),2) AS valor_anulacao,
ROUND(SAFE_CAST (0 AS FLOAT64),2) AS valor_ajuste,
ROUND(SAFE_CAST (valor_empenho_original AS FLOAT64) + SAFE_CAST (IFNULL(valor_reforco,0) AS FLOAT64) - SAFE_CAST (IFNULL(valor_anulacao,0) AS FLOAT64),2) AS valor_final
ROUND(SAFE_CAST (valor_empenho_original AS FLOAT64) + SAFE_CAST (valor_reforco AS FLOAT64) - SAFE_CAST (valor_anulacao AS FLOAT64),2) AS valor_final
FROM basedosdados-staging.world_wb_mides_staging.raw_empenho_mg
),
dlic AS (
Expand Down
2 changes: 1 addition & 1 deletion models/world_wb_mides/licitacao_item.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SELECT
SELECT
SAFE_CAST(ano AS INT64) ano,
SAFE_CAST(sigla_uf AS STRING) sigla_uf,
SAFE_CAST(id_municipio AS STRING) id_municipio,
Expand Down
2 changes: 1 addition & 1 deletion models/world_wb_mides/licitacao_participante.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SELECT
SELECT
SAFE_CAST(ano AS INT64) ano,
SAFE_CAST(sigla_uf AS STRING) sigla_uf,
SAFE_CAST(id_municipio AS STRING) id_municipio,
Expand Down