Skip to content

Commit

Permalink
Merge pull request #420 from basedosdados/fix/lint-err
Browse files Browse the repository at this point in the history
fix: undo typo in table full name
  • Loading branch information
vncsna authored Feb 15, 2024
2 parents 6c44ef4 + 02edb40 commit 612b00b
Show file tree
Hide file tree
Showing 70 changed files with 143 additions and 168 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ with
safe_cast(id_final_legislatura as string) id_final_legislatura,
safe_cast(url_site as string) url_site,
safe_cast(url_rede_social as string) url_rede_social,
from basedosdados - dev.br_camara_dados_abertos_staging.deputado
from `basedosdados-dev.br_camara_dados_abertos_staging.deputado`
),
uniao_valores as (
select a.*, b.nome as name_id_municipio, b.id_municipio, b.sigla_uf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ with
safe_cast(data_inicio_situacao as date) data_inicio_situacao,
safe_cast(categoria_registro as string) categoria_registro
from
basedosdados
- dev.br_cvm_administradores_carteira_staging.pessoa_fisica as t
`basedosdados-dev.br_cvm_administradores_carteira_staging.pessoa_fisica`
as t
)
select *
from tabela
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ with
safe_cast(email as string) email,
safe_cast(website as string) website
from
basedosdados
- dev.br_cvm_administradores_carteira_staging.pessoa_juridica as t
`basedosdados-dev.br_cvm_administradores_carteira_staging.pessoa_juridica`
as t
)
select *
from tabela
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ with
else tipo_veiculo
end as tipo_veiculo2,
quantidade
from basedosdados - dev.br_denatran_frota_staging.municipio_tipo
from `basedosdados-dev.br_denatran_frota_staging.municipio_tipo`
)

select
Expand Down
2 changes: 1 addition & 1 deletion models/br_denatran_frota/br_denatran_frota__uf_tipo.sql
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ with
else tipo_veiculo
end as tipo_veiculo2,
quantidade
from basedosdados - dev.br_denatran_frota_staging.uf_tipo
from `basedosdados-dev.br_denatran_frota_staging.uf_tipo`
)

select
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ with
# SAFE_CAST(REPLACE(densidade_demografica_habitante_por_quilometro_quadrado_,
# ",", ".") AS FLOAT64) densidade_demografica,
from
basedosdados
- dev.br_ibge_censo_2022_staging.area_territorial_densidade_demografica_municipio
`basedosdados-dev.br_ibge_censo_2022_staging.area_territorial_densidade_demografica_municipio`
as t
)
select t2.cod as id_municipio, ibge.* except (municipio, nome_municipio, sigla_uf)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ with
as int64
) moradores,
from
basedosdados
- dev.br_ibge_censo_2022_staging.domicilio_morador_municipio as t
`basedosdados-dev.br_ibge_censo_2022_staging.domicilio_morador_municipio`
as t
)
select t2.cod as id_municipio, ibge.* except (municipio, nome_municipio, sigla_uf)
from ibge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ with
safe_cast(especie as string) especie,
safe_cast(domicilios_recenseados_domicilios_ as int64) domicilios,
from
basedosdados
- dev.br_ibge_censo_2022_staging.domicilio_recenseado_especie_municipio as t
`basedosdados-dev.br_ibge_censo_2022_staging.domicilio_recenseado_especie_municipio`
as t
)
select t2.cod as id_municipio, ibge.* except (municipio, nome_municipio, sigla_uf)
from ibge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ with
safe_cast(replace(idade_mediana_anos_, ",", ".") as float64) idade_mediana,
safe_cast(replace(razao_de_sexo_razao_, ",", ".") as float64) razao_sexo,
from
basedosdados
- dev.br_ibge_censo_2022_staging.indice_envelhecimento_municipio as t
`basedosdados-dev.br_ibge_censo_2022_staging.indice_envelhecimento_municipio`
as t
)
select t2.cod as id_municipio, ibge.* except (municipio, nome_municipio, sigla_uf)
from ibge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ with
# SAFE_CAST(REPLACE(media_de_moradores_em_domicilios_particulares_permanentes_ocupados_pessoas_, ",", ".") AS FLOAT64) media_moradores_domicilios,
# SAFE_CAST(REPLACE(media_de_moradores_indigenas_em_domicilios_particulares_permanentes_ocupados_com_pelo_menos_um_morador_indigena_pessoas_, ",", ".") AS FLOAT64) media_moradores_indigenas_domicilios,
from
basedosdados
- dev.br_ibge_censo_2022_staging.indigenas_domicilio_morador_municipio as t
`basedosdados-dev.br_ibge_censo_2022_staging.indigenas_domicilio_morador_municipio`
as t
)
select t2.cod as id_municipio, ibge.* except (municipio, nome_municipio, sigla_uf)
from ibge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ select
) moradores_indigenas,
# SAFE_CAST(REPLACE(media_de_moradores_indigenas_em_domicilios_particulares_permanentes_ocupados_com_pelo_menos_um_morador_indigena_localizados_em_terras_indigenas_pessoas_, ",", ".") AS FLOAT64) media_moradores_indigenas_domicilios_terras_indigenas,
from
basedosdados
- dev.br_ibge_censo_2022_staging.indigenas_domicilio_morador_terra_indigena as t
`basedosdados-dev.br_ibge_censo_2022_staging.indigenas_domicilio_morador_terra_indigena`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ with
# (REPLACE(media_de_moradores_em_domicilios_particulares_permanentes_ocupados_com_pelo_menos_um_morador_indigena_pessoas_, ",", ".") AS FLOAT64) media_moradores_domicilios_pelo_menos_um,
# SAFE_CAST(REPLACE(media_de_moradores_indigenas_em_domicilios_particulares_permanentes_ocupados_com_pelo_menos_um_morador_indigena_pessoas_, ",", ".") AS FLOAT64) media_moradores_indigenas_domicilios_pelo_menos_um,
from
basedosdados
- dev.br_ibge_censo_2022_staging.indigenas_domicilio_pelo_menos_um_morador_indigena_municipio
`basedosdados-dev.br_ibge_censo_2022_staging.indigenas_domicilio_pelo_menos_um_morador_indigena_municipio`
as t
)
select t2.cod as id_municipio, ibge.* except (municipio, nome_municipio, sigla_uf)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ select
) moradores_indigenas,
# SAFE_CAST(REPLACE(media_de_moradores_indigenas_em_domicilios_particulares_permanentes_ocupados_com_pelo_menos_um_morador_indigena_pessoas_, ",", ".") AS FLOAT64) media_moradores_indigenas_domicilios_terras_indigenas_pelo_menos_um,
from
basedosdados
- dev.br_ibge_censo_2022_staging.indigenas_domicilio_pelo_menos_um_morador_indigena_terra_indigena
`basedosdados-dev.br_ibge_censo_2022_staging.indigenas_domicilio_pelo_menos_um_morador_indigena_terra_indigena`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ with
safe_cast(pessoas_indigenas_pessoas_ as int64) pessoas_indigenas,
safe_cast(populacao_residente_pessoas_ as int64) populacao_residente,
from
basedosdados
- dev.br_ibge_censo_2022_staging.indigenas_populacao_residente_municipio
`basedosdados-dev.br_ibge_censo_2022_staging.indigenas_populacao_residente_municipio`
as t
)
select t2.cod as id_municipio, ibge.* except (municipio, nome_municipio, sigla_uf)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ select
) pessoas_indigenas,
safe_cast(quesito_de_declaracao_indigena as string) quesito_declaracao_indigena,
from
basedosdados
- dev.br_ibge_censo_2022_staging.indigenas_populacao_residente_terra_indigena as t
`basedosdados-dev.br_ibge_censo_2022_staging.indigenas_populacao_residente_terra_indigena`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ with
safe_cast(idade as string) idade,
safe_cast(populacao_residente_pessoas_ as int64) populacao_residente,
from
basedosdados
- dev.br_ibge_censo_2022_staging.populacao_residente_municipio as t
`basedosdados-dev.br_ibge_censo_2022_staging.populacao_residente_municipio`
as t
)
select t2.cod as id_municipio, ibge.* except (municipio, nome_municipio, sigla_uf)
from ibge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ with
# SAFE_CAST(REPLACE(media_de_moradores_quilombolas_em_domicilios_particulares_permanentes_ocupados_com_pelo_menos_um_morador_quilombola_pessoas_, ",", ".") AS FLOAT64) media_moradores_quilombolas_domicilios,
safe_cast(localizacao_do_domicilio as string) localizacao_domicilio,
from
basedosdados
- dev.br_ibge_censo_2022_staging.quilombolas_domicilio_morador_municipio
`basedosdados-dev.br_ibge_censo_2022_staging.quilombolas_domicilio_morador_municipio`
as t
)
select t2.cod as id_municipio, ibge.* except (municipio, nome_municipio, sigla_uf)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@ select
# FLOAT64) media_moradores_domicilios_pelo_menos_um_territorios_quilombolas,
# SAFE_CAST(media_moradores_quilombolas_domicilios_pelo_menos_um_territorios_quilombolas AS FLOAT64) media_moradores_quilombolas_domicilios_pelo_menos_um_territorios_quilombolas,
from
basedosdados
- dev.br_ibge_censo_2022_staging.quilombolas_domicilio_morador_territorio_quilombola
`basedosdados-dev.br_ibge_censo_2022_staging.quilombolas_domicilio_morador_territorio_quilombola`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ with
# SAFE_CAST(media_de_moradores_quilombolas_em_domicilios_particulares_permanentes_ocupados_com_pelo_menos_um_morador_quilombola_pessoas_ AS FLOAT64) media_moradores_quilombolas_domicilios_particulares_pelo_menos_um,
safe_cast(localizacao_do_domicilio as string) localizacao_domicilio,
from
basedosdados
- dev.br_ibge_censo_2022_staging.quilombolas_domicilio_pelo_menos_um_morador_quilombola_municipio
`basedosdados-dev.br_ibge_censo_2022_staging.quilombolas_domicilio_pelo_menos_um_morador_quilombola_municipio`
as t
)
select t2.cod as id_municipio, ibge.* except (municipio, nome_municipio, sigla_uf)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ select
as int64
) moradores_quilombolas,
from
basedosdados
- dev.br_ibge_censo_2022_staging.quilombolas_domicilio_pelo_menos_um_morador_quilombola_territorio_quilombola
`basedosdados-dev.br_ibge_censo_2022_staging.quilombolas_domicilio_pelo_menos_um_morador_quilombola_territorio_quilombola`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ with
safe_cast(pessoas_quilombolas_pessoas_ as int64) pessoas_quilombolas,
safe_cast(populacao_residente_pessoas_ as int64) populacao_residente,
from
basedosdados
- dev.br_ibge_censo_2022_staging.quilombolas_populacao_residente_municipio
`basedosdados-dev.br_ibge_censo_2022_staging.quilombolas_populacao_residente_municipio`
as t
)
select t2.cod as id_municipio, ibge.* except (municipio, nome_municipio, sigla_uf)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,5 @@ select
pessoas_residentes_em_territorios_quilombolas_pessoas_ as int64
) populacao_residente,
from
basedosdados
- dev.br_ibge_censo_2022_staging.quilombolas_populacao_residente_territorio_quilombola
`basedosdados-dev.br_ibge_censo_2022_staging.quilombolas_populacao_residente_territorio_quilombola`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,5 @@ select
safe_cast(v254 as int64) v254,
safe_cast(v255 as int64) v255
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_alfabetizacao_homens_mulheres_2010
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_alfabetizacao_homens_mulheres_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,5 @@ select
safe_cast(v084 as int64) v084,
safe_cast(v085 as int64) v085
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_alfabetizacao_total_2010
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_alfabetizacao_total_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ select
safe_cast(v011 as float64) v011,
safe_cast(v012 as float64) v012
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_basico_2010 as t
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_basico_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,5 @@ select
safe_cast(v240 as int64) v240,
safe_cast(v241 as int64) v241
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_domicilio_caracteristicas_gerais_2010
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_domicilio_caracteristicas_gerais_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,5 @@ select
safe_cast(v131 as int64) v131,
safe_cast(v132 as int64) v132
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_domicilio_moradores_2010
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_domicilio_moradores_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ select
safe_cast(v013 as int64) v013,
safe_cast(v014 as int64) v014
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_domicilio_renda_2010 as t
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_domicilio_renda_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -1075,5 +1075,5 @@ select
safe_cast(v1061 as int64) v1061,
safe_cast(v1062 as int64) v1062
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_entorno_2010 as t
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_entorno_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,5 @@ select
safe_cast(v133 as int64) v133,
safe_cast(v134 as int64) v134
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_idade_homens_2010 as t
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_idade_homens_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,5 @@ select
safe_cast(v133 as int64) v133,
safe_cast(v134 as int64) v134
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_idade_mulheres_2010 as t
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_idade_mulheres_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,5 @@ select
safe_cast(v133 as int64) v133,
safe_cast(v134 as int64) v134
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_idade_total_2010 as t
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_idade_total_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,5 @@ select
safe_cast(v131 as int64) v131,
safe_cast(v132 as int64) v132
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_pessoa_renda_2010 as t
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_pessoa_renda_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,5 @@ select
safe_cast(v154 as int64) v154,
safe_cast(v155 as int64) v155
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_raca_alfabetizacao_idade_genero_2010
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_raca_alfabetizacao_idade_genero_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ select
safe_cast(v009 as int64) v009,
safe_cast(v010 as int64) v010
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_raca_idade_0_4_genero_2010
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_raca_idade_0_4_genero_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -264,5 +264,5 @@ select
safe_cast(v250 as int64) v250,
safe_cast(v251 as int64) v251
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_raca_idade_genero_2010 as t
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_raca_idade_genero_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ select
safe_cast(v002 as int64) v002,
safe_cast(v003 as int64) v003
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_registro_civil_2010 as t
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_registro_civil_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,5 @@ select
safe_cast(v212 as int64) v212,
safe_cast(v213 as int64) v213
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_relacao_parentesco_conjuges_2010
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_relacao_parentesco_conjuges_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,5 @@ select
safe_cast(v203 as int64) v203,
safe_cast(v204 as int64) v204
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_relacao_parentesco_filhos_2010
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_relacao_parentesco_filhos_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,5 @@ select
safe_cast(v253 as int64) v253,
safe_cast(v254 as int64) v254
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_relacao_parentesco_filhos_enteados_2010
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_relacao_parentesco_filhos_enteados_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,5 @@ select
safe_cast(v239 as int64) v239,
safe_cast(v240 as int64) v240
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_relacao_parentesco_outros_2010
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_relacao_parentesco_outros_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,5 @@ select
safe_cast(v215 as int64) v215,
safe_cast(v216 as int64) v216
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_responsavel_domicilios_homens_total_2010
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_responsavel_domicilios_homens_total_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,5 @@ select
safe_cast(v107 as int64) v107,
safe_cast(v108 as int64) v108
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_responsavel_domicilios_mulheres_2010
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_responsavel_domicilios_mulheres_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,5 @@ select
safe_cast(v131 as int64) v131,
safe_cast(v132 as int64) v132
from
basedosdados
- dev.br_ibge_censo_demografico_staging.setor_censitario_responsavel_renda_2010 as t
`basedosdados-dev.br_ibge_censo_demografico_staging.setor_censitario_responsavel_renda_2010`
as t
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ select
safe_cast(unidade as string) unidade,
safe_cast(quantidade as int64) quantidade,
round(safe_cast(valor as float64), 4) valor,
from basedosdados - dev.br_ibge_pevs_staging.producao_extracao_vegetal
from `basedosdados-dev.br_ibge_pevs_staging.producao_extracao_vegetal`
where
produto is not null -- isso faz categorias de agregação caírem
and quantidade is not null -- isso faz unidade vazia cair
Loading

0 comments on commit 612b00b

Please sign in to comment.