Skip to content

Commit

Permalink
where dbt bd pro
Browse files Browse the repository at this point in the history
  • Loading branch information
tricktx committed Jul 19, 2023
1 parent 6107a6f commit 63c72fa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ SAFE_CAST(ano AS INT64) ano,
SAFE_CAST(mes AS INT64) mes,
SAFE_CAST(densidade AS FLOAT64) densidade

FROM basedosdados-staging.br_anatel_telefonia_movel_staging.densidade_brasil AS t
FROM basedosdados-staging.br_anatel_telefonia_movel_staging.densidade_brasil AS t
WHERE DATE_DIFF(CURRENT_DATE(),DATE(SAFE_CAST(ano AS INT64),SAFE_CAST(mes AS INT64),01),month) >= 6
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ REPLACE(CAST(id_municipio AS STRING), '.0', '') id_municipio,
SAFE_CAST(densidade AS FLOAT64) densidade

FROM basedosdados-staging.br_anatel_telefonia_movel_staging.densidade_municipio AS t
WHERE DATE_DIFF(CURRENT_DATE(),DATE(SAFE_CAST(ano AS INT64),SAFE_CAST(mes AS INT64),01),month) >= 6
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ SAFE_CAST(ano AS INT64) ano,
SAFE_CAST(mes AS INT64) mes,
SAFE_CAST(sigla_uf AS STRING) sigla_uf,
SAFE_CAST(densidade AS FLOAT64) densidade
FROM basedosdados-staging.br_anatel_telefonia_movel_staging.densidade_uf AS t
FROM basedosdados-staging.br_anatel_telefonia_movel_staging.densidade_uf AS t
WHERE DATE_DIFF(CURRENT_DATE(),DATE(SAFE_CAST(ano AS INT64),SAFE_CAST(mes AS INT64),01),month) >= 6
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ SAFE_CAST(pessoa AS STRING) pessoa,
SAFE_CAST(produto AS STRING) produto,
SAFE_CAST(acessos AS INT64) acessos

FROM basedosdados-staging.br_anatel_telefonia_movel_staging.microdados AS t
FROM basedosdados-staging.br_anatel_telefonia_movel_staging.microdados AS t
WHERE DATE_DIFF(CURRENT_DATE(),DATE(SAFE_CAST(ano AS INT64),SAFE_CAST(mes AS INT64),01),month) >= 6

0 comments on commit 63c72fa

Please sign in to comment.