Skip to content

Commit

Permalink
add ano and mes
Browse files Browse the repository at this point in the history
  • Loading branch information
tricktx committed Sep 12, 2023
1 parent 3c28c01 commit 6c87a0a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ config(
alias='iptu',
schema='br_mg_belohorizonte_smfa_iptu',
materialized='incremental',
materialized='table',
partition_by={
"field": "ano",
"data_type": "int64",
Expand Down Expand Up @@ -41,6 +41,6 @@ SAFE_CAST(fracao_ideal AS FLOAT64) fracao_ideal,
SAFE_CAST(area_terreno AS FLOAT64) area_terreno,
SAFE_CAST(area_construida AS FLOAT64) area_construida
FROM basedosdados-dev.br_mg_belohorizonte_smfa_iptu_staging.iptu AS t
{% if is_incremental() %}
WHERE CONCAT(ano,mes) > (SELECT MAX(CONCAT(ano,mes)) FROM {{ this }} )
{% endif %}
-- {% if is_incremental() %}
-- WHERE CONCAT(ano,mes) > (SELECT MAX(CONCAT(ano,mes)) FROM {{ this }} )
-- {% endif %}
6 changes: 5 additions & 1 deletion models/br_mg_belohorizonte_smfa_iptu/schema.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
version: 2

models:
- name: br_mg_belohorizonte_smfa_iptu_iptu
- name: br_mg_belohorizonte_smfa_iptu__iptu
description: Dados referente ao cadastro do IPTU na cidade de Belo Horizonte
columns:
- name: ano
description: Ano
- name: mes
description: Mês
- name: indice_cadastral
description: Os imóveis, para inscrição no Cadastro Imobiliário, foram codificados através de sua associação a um código alfanumérico denominado índice cadastral, composto de 15 dígitos.
- name: lote
Expand Down

0 comments on commit 6c87a0a

Please sign in to comment.