-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@vtr363 esse pull request tem conflitos 😩 |
@vtr363 esse pull request tem conflitos 😩 |
-- {{ ref("transacao") }} | ||
rj-smtr.br_rj_riodejaneiro_bilhetagem.transacao | ||
WHERE | ||
data >= DATE("2024-10-01") |
There was a problem hiding this comment.
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" ), |
There was a problem hiding this comment.
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 @@ | |||
{{ |
There was a problem hiding this comment.
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 @@ | |||
{{ |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 @@ | |||
{{ |
There was a problem hiding this comment.
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)
Análise da árvore de códigoNenhum problema encontrado! |
@@ -0,0 +1,22 @@ | |||
{{ config(materialized="ephemeral") }} |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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
Changelog - monitoramento
[1.2.2] - 2025-01-08
Adicionado
Cria modelos
sumario_servico_dia_pagamento_historico.sql
esumario_servico_dia_tipo_viagem_historico.sql
Adicionado o label
dashboard
aos modelossumario_servico_dia_pagamento_historico.sql
esumario_servico_dia_tipo_viagem_historico.sql
Changelog - projeto_subsidio_sppo
[9.1.5] - 2025-01-08
Adicionado
dashboard
ao modeloviagem_completa.sql