Skip to content

Commit

Permalink
revert commit in tables part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
tricktx committed Mar 14, 2024
1 parent 20dad5b commit d0aec47
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ select distinct
safe_cast(nis as string) nis_favorecido,
safe_cast(nome as string) nome_favorecido,
safe_cast(valor_beneficio as float64) valor_parcela,
from `basedosdados-staging.br_cgu_beneficios_cidadao_staging.auxilio_brasil` as t
from `basedosdados-dev.br_cgu_beneficios_cidadao_staging.auxilio_brasil` as t
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,4 @@ select distinct
safe_cast(nis as string) nis_favorecido,
safe_cast(nome as string) nome_favorecido,
safe_cast(valor_beneficio as float64) valor_parcela,
from
`basedosdados-staging.br_cgu_beneficios_cidadao_staging.bolsa_familia_pagamento`
as t
from `basedosdados-dev.br_cgu_beneficios_cidadao_staging.bolsa_familia_pagamento` as t
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ with
on safe_cast(t1.id_municipio_siafi as int64)
= safe_cast(t2.id_municipio_rf as int64)
)
select * except (data)
select * except (data) << << << < head
from bpc << << << < head
{% if is_incremental() %}
where data > (select max(data) from {{ this }})
Expand All @@ -53,3 +53,22 @@ from bpc << << << < head
add materialized incremental tables in novo_bolsa_familia,
garantia_safra and bpc
)
== ==
== =
from
bpc
{% if is_incremental() %}
date(cast(ano_competencia as int64), cast(mes_competencia as int64), 1) > (
select
max(
date(
cast(ano_competencia as int64),
cast(mes_competencia as int64),
1
)
)
from {{ this }}
)
{% endif %}
>> >>
>> > parent of d8643ab(fix bucket staging and incremental)
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ with
on safe_cast(t1.id_municipio_siafi as int64)
= safe_cast(t2.id_municipio_rf as int64)
)
select * except (data)
select * except (data) << << << < head
from garantia_safra << << << < head
{% if is_incremental() %}
where data > (select max(data) from {{ this }})
Expand All @@ -49,3 +49,22 @@ from garantia_safra << << << < head
add materialized incremental tables in novo_bolsa_familia,
garantia_safra and bpc
)
== ==
== =
from
garantia_safra
{% if is_incremental() %}
date(cast(ano_competencia as int64), cast(mes_competencia as int64), 1) > (
select
max(
date(
cast(ano_competencia as int64),
cast(mes_competencia as int64),
1
)
)
from {{ this }}
)
{% endif %}
>> >>
>> > parent of d8643ab(fix bucket staging and incremental)
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ with
on safe_cast(t1.id_municipio_siafi as int64)
= safe_cast(t2.id_municipio_rf as int64)
)
select * except (data)
select * except (data) << << << < head
from novo_bolsa_familia << << << < head
{% if is_incremental() %}
where data > (select max(data) from {{ this }})
Expand All @@ -49,3 +49,22 @@ from novo_bolsa_familia << << << < head
add materialized incremental tables in novo_bolsa_familia,
garantia_safra and bpc
)
== ==
== =
from
novo_bolsa_familia
{% if is_incremental() %}
date(cast(ano_competencia as int64), cast(mes_competencia as int64), 1) > (
select
max(
date(
cast(ano_competencia as int64),
cast(mes_competencia as int64),
1
)
)
from {{ this }}
)
{% endif %}
>> >>
>> > parent of d8643ab(fix bucket staging and incremental)

0 comments on commit d0aec47

Please sign in to comment.