diff --git a/pipelines/rj_smtr/br_rj_riodejaneiro_bilhetagem/flows.py b/pipelines/rj_smtr/br_rj_riodejaneiro_bilhetagem/flows.py index ffeb9806c..cf5580e61 100644 --- a/pipelines/rj_smtr/br_rj_riodejaneiro_bilhetagem/flows.py +++ b/pipelines/rj_smtr/br_rj_riodejaneiro_bilhetagem/flows.py @@ -40,6 +40,7 @@ every_hour, every_minute, every_day_hour_five, + every_day_hour_seven, every_5_minutes, ) @@ -306,6 +307,24 @@ bilhetagem_materializacao_gps_validador.state_handlers.append(skip_if_running_handler) +# Validação dos dados + +bilhetagem_validacao_jae = deepcopy(default_materialization_flow) +bilhetagem_validacao_jae.name = "SMTR: Bilhetagem Validação Jaé - Materialização" + +bilhetagem_validacao_jae.run_config = KubernetesRun( + image=emd_constants.DOCKER_IMAGE.value, + labels=[emd_constants.RJ_SMTR_AGENT_LABEL.value], +) + +bilhetagem_validacao_jae = set_default_parameters( + flow=bilhetagem_validacao_jae, + default_parameters=constants.BILHETAGEM_MATERIALIZACAO_GPS_VALIDADOR_GENERAL_PARAMS.value, +) + +bilhetagem_validacao_jae.schedule = every_day_hour_seven + + # RECAPTURA # bilhetagem_recaptura = deepcopy(default_capture_flow) diff --git a/pipelines/rj_smtr/constants.py b/pipelines/rj_smtr/constants.py index c979a181a..cf2348936 100644 --- a/pipelines/rj_smtr/constants.py +++ b/pipelines/rj_smtr/constants.py @@ -1277,6 +1277,17 @@ class constants(Enum): # pylint: disable=c0103 "source_type": BILHETAGEM_GENERAL_CAPTURE_PARAMS["source_type"], } + BILHETAGEM_MATERIALIZACAO_VALIDACAO_JAE_PARAMS = { + "dataset_id": "validacao_dados_jae", + "upstream": True, + "exclude": "+gps_sppo +sppo_veiculo_dia +gps_validador +transacao\ ++ordem_pagamento_dia +integracao +servicos", + "dbt_vars": { + "run_date": {}, + "version": {}, + }, + } + # GTFS GTFS_DATASET_ID = "gtfs"