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

fix: nomenclatura_comum_mercosul #555

Merged
merged 2 commits into from
Apr 19, 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
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ select
safe_cast(co_ppe as string) id_ppe,
safe_cast(co_ppi as string) id_ppi,
safe_cast(co_fat_agreg as string) id_fator_agregado_ncm,
safe_cast(co_cuci_item as string) id_cgce_n3,
safe_cast(co_cgce_n3 as string) id_isic_classe,
safe_cast(co_siit as string) id_exp_subset,
safe_cast(co_cgce_n3 as string) id_cgce_n3,
safe_cast(co_isic_classe as string) id_isic_classe,
safe_cast(co_siit as string) id_siit,
safe_cast(co_cuci_item as string) id_cuci_item,
safe_cast(
case
when co_unid = '10'
Expand Down Expand Up @@ -44,9 +45,9 @@ select
else lower(co_unid)
end as string
) as nome_unidade,
safe_cast(co_isic_classe as string) nome_ncm_portugues,
safe_cast(co_exp_subset as string) nome_ncm_espanhol,
safe_cast(no_ncm_por as string) nome_ncm_ingles,
safe_cast(no_ncm_por as string) nome_ncm_portugues,
safe_cast(no_ncm_esp as string) nome_ncm_espanhol,
safe_cast(no_ncm_ing as string) nome_ncm_ingles,
from
`basedosdados-staging.br_bd_diretorios_mundo_staging.nomenclatura_comum_mercosul`
as t
12 changes: 8 additions & 4 deletions models/br_bd_diretorios_mundo/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ models:
- name: id_ncm
description: Identificador da Nomenclatura Comum do Mercosul (NCM)
- name: id_unidade
description: Identificador da unidade estátisca do id_ncm
description: Identificador da unidade estatística do id_ncm
- name: id_sh6
description: Identificador de 6 dígitos do Sistema Harmonizado (SH6) relacionado
com o id_ncm
tests:
- relationships:
to: ref('br_bd_diretorios_brasil__sistema_harmonizado')
to: ref('br_bd_diretorios_mundo__sistema_harmonizado')
field: id_sh6
- name: id_ppe
description: Identificador da Pauta de Produtos Exportados (PPE) do id_ncm
Expand All @@ -60,8 +60,12 @@ models:
- name: id_isic_classe
description: Identificador da classe da Classificação de Setores Industriais
ISIC (International Standard Industrial Classification) do id_ncm
- name: id_exp_subset
description: Não informado
- name: id_siit
description: Identificador da classificação de Setores Industriais por Intensidade
Tecnológica (SIIT) do id_ncm
- name: id_cuci_item
description: Identificador do item da Classificação Uniforme para o Comércio
Internacional (CUCI) do id_ncm
- name: nome_unidade
description: Nome da unidade estatística do id_ncm
- name: nome_ncm_portugues
Expand Down
Loading