Skip to content

Commit

Permalink
Merge pull request #292 from basedosdados/staging/br_mg_smfa
Browse files Browse the repository at this point in the history
date model incremental
  • Loading branch information
tricktx authored Sep 13, 2023
2 parents 4835249 + e24457b commit 7921fa8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ 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 }} )
WHERE DATE(CAST(ano AS INT64),CAST(mes AS INT64),1) > (SELECT MAX(DATE(CAST(ano AS INT64),CAST(mes AS INT64),1)) FROM {{ this }} )
{% endif %}

0 comments on commit 7921fa8

Please sign in to comment.