Skip to content

Commit

Permalink
Faz alterações solicitadas
Browse files Browse the repository at this point in the history
  • Loading branch information
folhesgabriel committed Sep 20, 2023
1 parent e918073 commit 1d9ec16
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@
FILTER USING DATE_DIFF(DATE("{{ run_started_at.strftime("%Y-%m-%d") }}"),DATE(data_registro), MONTH) =< 6)']
)
}}
SELECT
WITH tabela as( SELECT
SAFE_CAST(nome AS STRING) nome,
SAFE_CAST(data_registro AS DATE) data_registro,
SAFE_CAST(data_cancelamento AS DATE) data_cancelamento,
SAFE_CAST(motivo_cancelamento AS STRING) motivo_cancelamento,
SAFE_CAST(situacao AS STRING) situacao,
SAFE_CAST(data_inicio_situacao AS DATE) data_inicio_situacao,
SAFE_CAST(categoria_registro AS STRING) categoria_registro
FROM basedosdados-staging.br_cvm_administradores_carteira_staging.pessoa_fisica AS t
FROM basedosdados-staging.br_cvm_administradores_carteira_staging.pessoa_fisica AS t)
select *
from tabela
{% if is_incremental() %}

-- this filter will only be applied on an incremental run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
)
}}

SELECT
WITH tabela as(SELECT
SAFE_CAST(cnpj AS STRING) cnpj,
SAFE_CAST(denominacao_social AS STRING) denominacao_social,
SAFE_CAST(denominacao_comercial AS STRING) denominacao_comercial,
Expand All @@ -45,7 +45,9 @@ SAFE_CAST(valor_patrimonial_liquido AS STRING) valor_patrimonial_liquido,
SAFE_CAST(data_patrimonio_liquido AS DATE) data_patrimonio_liquido,
SAFE_CAST(email AS STRING) email,
SAFE_CAST(website AS STRING) website
FROM basedosdados-staging.br_cvm_administradores_carteira_staging.pessoa_juridica AS t
FROM basedosdados-staging.br_cvm_administradores_carteira_staging.pessoa_juridica AS t)
select *
from tabela
{% if is_incremental() %}

-- this filter will only be applied on an incremental run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
FILTER USING DATE_DIFF(DATE("{{ run_started_at.strftime("%Y-%m-%d") }}"),DATE(data_registro), MONTH) =< 6)']
}}

SELECT
WITH tabela as(SELECT
SAFE_CAST(numero_processo AS STRING) numero_processo,
SAFE_CAST(numero_registro_oferta AS STRING) numero_registro_oferta,
SAFE_CAST(tipo_oferta AS STRING) tipo_oferta,
Expand Down Expand Up @@ -64,7 +64,9 @@ SAFE_CAST(tipo_societario_emissor AS STRING) tipo_societario_emissor,
SAFE_CAST(tipo_fundo_investimento AS STRING) tipo_fundo_investimento,
SAFE_CAST(ultimo_comunicado AS STRING) ultimo_comunicado,
SAFE_CAST(data_comunicado AS DATE) data_comunicado
FROM basedosdados-staging.br_cvm_oferta_publica_distribuicao_staging.dia AS t
FROM basedosdados-staging.br_cvm_oferta_publica_distribuicao_staging.dia AS t)
SELECT *
FROM tabela
{% if is_incremental() %}

-- this filter will only be applied on an incremental run
Expand Down

0 comments on commit 1d9ec16

Please sign in to comment.