diff --git a/rj_smtr/constants.html b/rj_smtr/constants.html index a38fa3431..06abdc79e 100644 --- a/rj_smtr/constants.html +++ b/rj_smtr/constants.html @@ -197,6 +197,37 @@

Module pipelines.rj_smtr.constants

SUBSIDIO_SPPO_DASHBOARD_STAGING_DATASET_ID = "dashboard_subsidio_sppo_staging" SUBSIDIO_SPPO_DASHBOARD_TABLE_ID = "sumario_servico_dia" SUBSIDIO_SPPO_DATA_CHECKS_PARAMS = { + "check_trips_processing": { + "query": """SELECT + s.data, + s.tipo_dia, + s.subtipo_dia, + s.tipo_os, + s.feed_version, + s.feed_start_date AS feed_start_date_invalido, + i.feed_start_date AS feed_start_date_valido, + FROM ( + SELECT + * + FROM + rj-smtr.projeto_subsidio_sppo.subsidio_data_versao_efetiva + WHERE + DATA >= "2024-04-01" -- DATA_SUBSIDIO_V6_INICIO (Feature trajetos alternativos) + AND DATA BETWEEN DATE("{start_timestamp}") + AND DATE("{end_timestamp}") + ) AS s + LEFT JOIN + rj-smtr.gtfs.feed_info AS i + ON + (DATA BETWEEN i.feed_start_date + AND i.feed_end_date + OR (DATA >= i.feed_start_date + AND i.feed_end_date IS NULL)) + WHERE + i.feed_start_date != s.feed_start_date + """, + "order_columns": ["data"], + }, "check_gps_capture": { "query": """WITH t AS ( @@ -594,6 +625,9 @@

Module pipelines.rj_smtr.constants

"Todos os dados de status dos veículos foram devidamente tratados": { "test": "check_sppo_veiculo_dia", }, + "Todos os dados de viagens foram tratados com o respectivo feed correto do GTFS": { + "test": "check_trips_processing", + }, } } SUBSIDIO_SPPO_DATA_CHECKS_POS_LIST = { @@ -1773,6 +1807,37 @@

Classes

SUBSIDIO_SPPO_DASHBOARD_STAGING_DATASET_ID = "dashboard_subsidio_sppo_staging" SUBSIDIO_SPPO_DASHBOARD_TABLE_ID = "sumario_servico_dia" SUBSIDIO_SPPO_DATA_CHECKS_PARAMS = { + "check_trips_processing": { + "query": """SELECT + s.data, + s.tipo_dia, + s.subtipo_dia, + s.tipo_os, + s.feed_version, + s.feed_start_date AS feed_start_date_invalido, + i.feed_start_date AS feed_start_date_valido, + FROM ( + SELECT + * + FROM + rj-smtr.projeto_subsidio_sppo.subsidio_data_versao_efetiva + WHERE + DATA >= "2024-04-01" -- DATA_SUBSIDIO_V6_INICIO (Feature trajetos alternativos) + AND DATA BETWEEN DATE("{start_timestamp}") + AND DATE("{end_timestamp}") + ) AS s + LEFT JOIN + rj-smtr.gtfs.feed_info AS i + ON + (DATA BETWEEN i.feed_start_date + AND i.feed_end_date + OR (DATA >= i.feed_start_date + AND i.feed_end_date IS NULL)) + WHERE + i.feed_start_date != s.feed_start_date + """, + "order_columns": ["data"], + }, "check_gps_capture": { "query": """WITH t AS ( @@ -2170,6 +2235,9 @@

Classes

"Todos os dados de status dos veículos foram devidamente tratados": { "test": "check_sppo_veiculo_dia", }, + "Todos os dados de viagens foram tratados com o respectivo feed correto do GTFS": { + "test": "check_trips_processing", + }, } } SUBSIDIO_SPPO_DATA_CHECKS_POS_LIST = {