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

Cria dicionário RDO #407

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion pipelines/migration/br_rj_riodejaneiro_rdo/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""
Flows for br_rj_riodejaneiro_rdo

DBT 2024-09-06
DBT: 2025-01-31
"""
from prefect import Parameter, case
from prefect.run_configs import KubernetesRun
Expand Down
13 changes: 13 additions & 0 deletions queries/models/br_rj_riodejaneiro_rdo/dicionario_rdo.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{
config(
materialized="table",
alias="dicionario",
)
}}
select
safe_cast(chave as string) as chave,
safe_cast(cobertura_temporal as string) as cobertura_temporal,
safe_cast(id_tabela as string) as id_tabela,
safe_cast(coluna as string) as coluna,
safe_cast(valor as string) as valor
from {{ source("br_rj_riodejaneiro_rdo_staging", "dicionario") }}
13 changes: 13 additions & 0 deletions queries/models/br_rj_riodejaneiro_rdo/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,3 +301,16 @@ models:
quote: true
description: "{{ doc('datetime_ultima_atualizacao') }}"
description: Tabela materializada para acesso geral aos dados do RDO STPL
- name: dicionario_rdo
description: "Dicionário de dados"
columns:
- name: chave
description: "Chave"
- name: cobertura_temporal
description: "Cobertura temporal"
- name: id_tabela
description: "Nome da tabela"
- name: coluna
description: "Nome da coluna"
- name: valor
description: "Valor"
1 change: 1 addition & 0 deletions queries/models/sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ sources:
- name: rho_registros_sppo
- name: rho_registros_stpl
- name: rdo_registros_stpl
- name: dicionario

- name: br_rj_riodejaneiro_rdo
database: rj-smtr
Expand Down
Loading