Skip to content

Commit

Permalink
Merge pull request #546 from basedosdados/add-test-dbt-in-poder360
Browse files Browse the repository at this point in the history
fix: add more test in dbt
  • Loading branch information
tricktx authored May 27, 2024
2 parents b0e4c56 + 9748f06 commit 56c6698
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
22 changes: 19 additions & 3 deletions models/br_poder360_pesquisas/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,28 @@ models:
to: ref('br_bd_diretorios_brasil__uf')
field: sigla
ignore_values: [RE]
proportion_allowed_failures: 0.2
proportion_allowed_failures: 0.0
- name: nome_municipio
description: Nome do município
- name: cargo
description: Cargo
tests:
- accepted_values:
values:
- presidente
- congresso nacional
- prefeito
- governador
- senador
- name: data
description: Data
tests:
- relationships:
to: ref('br_bd_diretorios_data_tempo__data')
field: data.data
- name: data_referencia
description: Data de referência
description: Data de referencia da coleta da pesquisa, pode ser um unico dia
ou intervalo de dias.
- name: instituto
description: Instituto realizador
- name: contratante
Expand All @@ -54,6 +63,10 @@ models:
description: Tipo
- name: turno
description: Turno
tests:
- accepted_values:
values: [1, 2]
quote: false
- name: tipo_voto
description: Tipo do voto
tests: [not_null]
Expand All @@ -77,4 +90,7 @@ models:
tests: [not_null]
- name: percentual
description: Percentual
tests: [not_null]
tests:
- dbt_utils.accepted_range:
min_value: 0
max_value: 150
4 changes: 2 additions & 2 deletions profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ default:
dataset: dbt
location: US
threads: 2
keyfile: /credentials-dev/dev.json
keyfile: /home/tricktx/.basedosdados/credentials/staging.json
prod:
type: bigquery
method: service-account
project: basedosdados-dev
dataset: dbt
location: US
threads: 2
keyfile: /credentials-prod/prod.json
keyfile: /home/tricktx/.basedosdados/credentials/prod.json
elementary:
outputs:
default:
Expand Down

0 comments on commit 56c6698

Please sign in to comment.