Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cria a views de dados historicos no dataset monitoramento #258

Open
wants to merge 41 commits into
base: main
Choose a base branch
from

Conversation

vtr363
Copy link
Contributor

@vtr363 vtr363 commented Oct 3, 2024

Changelog - monitoramento

[1.2.2] - 2025-01-08

Adicionado

  • Cria modelos sumario_servico_dia_pagamento_historico.sql e sumario_servico_dia_tipo_viagem_historico.sql

  • Adicionado o label dashboard aos modelos sumario_servico_dia_pagamento_historico.sql e sumario_servico_dia_tipo_viagem_historico.sql

Changelog - projeto_subsidio_sppo

[9.1.5] - 2025-01-08

Adicionado

  • Adicionado label dashboard ao modelo viagem_completa.sql

vtr363 and others added 25 commits October 3, 2024 18:18
Copy link
Contributor

mergify bot commented Oct 22, 2024

@vtr363 esse pull request tem conflitos 😩

@mergify mergify bot added the conflict label Oct 22, 2024
@vtr363 vtr363 removed the conflict label Oct 22, 2024
@vtr363 vtr363 changed the title cria a view sumario_servico_dia_pagamento_historico cria a views de dados historicos no dataset monitoramento Oct 22, 2024
@vtr363 vtr363 linked an issue Oct 23, 2024 that may be closed by this pull request
@vtr363 vtr363 linked an issue Oct 23, 2024 that may be closed by this pull request
Copy link
Contributor

mergify bot commented Oct 23, 2024

@vtr363 esse pull request tem conflitos 😩

@mergify mergify bot added the conflict label Oct 23, 2024
-- {{ ref("transacao") }}
rj-smtr.br_rj_riodejaneiro_bilhetagem.transacao
WHERE
data >= DATE("2024-10-01")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Associar data a variável

servico,
consorcio)
WHERE
data >= "2024-08-16" ),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Associar a variável

@@ -0,0 +1,89 @@
{{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Essa nova tabela é necessária?

@@ -0,0 +1,53 @@
{{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Essa nova tabela é necessária?

@@ -0,0 +1,53 @@
{{
config(
materialized="view",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Essa tabela deve ser materializada

@@ -0,0 +1,89 @@
{{
config(
materialized="view",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Essa tabela deve ser materializada

WHEN viagem_anterior_chegada IS NULL THEN
DATETIME(TIMESTAMP_SUB(datetime_partida, INTERVAL 30 MINUTE))
ELSE DATETIME(TIMESTAMP_ADD(viagem_anterior_chegada, INTERVAL 1 SECOND))
END AS datetime_partida_com_tolerancia
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validar lógica com CMO, especialmente sobre a primeira viagem do dia

@@ -0,0 +1,258 @@
{{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Colocar em outro PR (usar modelo atual)

@vtr363 vtr363 linked an issue Jan 8, 2025 that may be closed by this pull request
Copy link

github-actions bot commented Jan 8, 2025

Análise da árvore de código

Nenhum problema encontrado!

@vtr363 vtr363 removed the conflict label Jan 9, 2025
@@ -0,0 +1,22 @@
{{ config(materialized="ephemeral") }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Não seria melhor colocar em _staging?

+ coalesce(km_apurada_licenciado_com_ar_n_autuado, 0)
+ coalesce(km_apurada_sem_transacao, 0)
+ coalesce(km_apurada_n_vistoriado, 0)
+ coalesce(km_apurada_n_licenciado, 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmar sobre tabela pivotada

viagens,
km_apurada,
km_planejada,
100 * km_apurada / km_planejada as perc_km_planejada,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conferir se tem arredondamento na outra tabela

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Criar view histórica do subsídio
2 participants