Skip to content

Commit

Permalink
Merge pull request #331 from basedosdados/br_inpe_queimadas
Browse files Browse the repository at this point in the history
[dados] br_inpe_queimadas
  • Loading branch information
laura-l-amaral authored Nov 9, 2023
2 parents 8ca7e67 + fbc07f5 commit 1a7eaed
Show file tree
Hide file tree
Showing 4 changed files with 452 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ models:
br_inpe_prodes:
+materialized: table
+schema: br_inpe_prodes
br_inpe_queimadas:
+materialized: table
+schema: br_inpe_queimadas
br_jota:
+materialized: table
+schema: br_jota
Expand Down
19 changes: 19 additions & 0 deletions models/br_inpe_queimadas/br_inpe_queimadas__microdados.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{
config(
alias = 'microdados',
schema = "br_inpe_queimadas",
materialized = "table",
labels = {"tema": "meio-ambiente"}
)
}}
SELECT
SAFE_CAST(ano AS INT64) ano,
SAFE_CAST(sigla_uf AS STRING) sigla_uf,
SAFE_CAST(id_municipio AS STRING) id_municipio,
SAFE_CAST(bioma AS STRING) bioma,
SAFE_CAST(id_bdq AS STRING) id_bdq,
SAFE_CAST(id_foco AS STRING) id_foco,
SAFE_CAST(data_hora AS DATETIME) data_hora,
ST_GEOGPOINT(SAFE_CAST (longitude AS FLOAT64), SAFE_CAST (latitude AS FLOAT64)) centroide,
FROM basedosdados-staging.br_inpe_queimadas_staging.microdados AS t

Loading

0 comments on commit 1a7eaed

Please sign in to comment.