Skip to content

Commit

Permalink
Merge pull request #559 from basedosdados/staging/fix_comex_dicionario
Browse files Browse the repository at this point in the history
[dbt] br_me_comex_stat.dicionario
  • Loading branch information
folhesgabriel authored Apr 24, 2024
2 parents 1b47a6c + 305154a commit b9154a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions models/br_me_comex_stat/br_me_comex_stat__dicionario.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@
}}
select
safe_cast(id_tabela as string) id_tabela,
safe_cast(coluna as string) coluna,
safe_cast(chave as string) chave,
safe_cast(coluna as string) nome_coluna,
safe_cast(
case
when coluna = 'id_urf'
then lpad(safe_cast(chave as string), 6, '0')
else safe_cast(chave as string)
end as string
) chave,
safe_cast(cobertura_temporal as string) cobertura_temporal,
safe_cast(valor as string) valor
from `basedosdados-staging.br_me_comex_stat_staging.dicionario` as t
4 changes: 2 additions & 2 deletions models/br_me_comex_stat/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@ models:
columns:
- name: id_tabela
description: ID da tabela
- name: coluna
- name: nome_coluna
description: Nome da coluna
- name: chave
description: Chave
- name: cobertura_temporal
description: Cobertura Temporal
description: Cobertura temporal
- name: valor
description: Valor

0 comments on commit b9154a7

Please sign in to comment.