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

[dbt] br_me_comex_stat.dicionario #559

Merged
merged 4 commits into from
Apr 24, 2024
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
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
Loading