Skip to content

Commit

Permalink
criar flow de materialização de validação da jaé
Browse files Browse the repository at this point in the history
  • Loading branch information
pixuimpou committed May 16, 2024
1 parent 675f87a commit 5565104
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pipelines/rj_smtr/br_rj_riodejaneiro_bilhetagem/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
every_hour,
every_minute,
every_day_hour_five,
every_day_hour_seven,
every_5_minutes,
)

Expand Down Expand Up @@ -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)
Expand Down
11 changes: 11 additions & 0 deletions pipelines/rj_smtr/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 5565104

Please sign in to comment.