Skip to content

Commit

Permalink
Remove materializacao do gtfs antigo (#681)
Browse files Browse the repository at this point in the history
* remove materializacao do gtfs antigo do flow SMTR: GTFS - Captura/Tratamento

* altera referencias a modelos do gtfs antigo

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
vtr363 and mergify[bot] committed May 14, 2024
1 parent 4de5f4a commit 675f87a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 22 deletions.
18 changes: 0 additions & 18 deletions pipelines/rj_smtr/br_rj_riodejaneiro_gtfs/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
}

gtfs_materializacao_parameters = dbt_vars
gtfs_materializacao_parameters_new = {
"dataset_id": "gtfs",
} | dbt_vars

run_materializacao = create_flow_run(
flow_name=gtfs_materializacao.name,
Expand All @@ -129,28 +126,13 @@
upstream_tasks=[wait_captura],
)

run_materializacao_new_dataset_id = create_flow_run(
flow_name=gtfs_materializacao.name,
project_name=emd_constants.PREFECT_DEFAULT_PROJECT.value,
parameters=gtfs_materializacao_parameters_new,
labels=LABELS,
upstream_tasks=[wait_captura],
)

wait_materializacao = wait_for_flow_run(
run_materializacao,
stream_states=True,
stream_logs=True,
raise_final_state=True,
)

wait_materializacao_new_dataset_id = wait_for_flow_run(
run_materializacao_new_dataset_id,
stream_states=True,
stream_logs=True,
raise_final_state=True,
)

gtfs_captura_tratamento.storage = GCS(emd_constants.GCS_FLOWS_BUCKET.value)
gtfs_captura_tratamento.run_config = KubernetesRun(
image=emd_constants.DOCKER_IMAGE.value,
Expand Down
6 changes: 3 additions & 3 deletions pipelines/rj_smtr/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ class constants(Enum): # pylint: disable=c0103
},
"version": {},
},
"exclude": f"{BILHETAGEM_EXCLUDE} stops_gtfs2 routes_gtfs2 feed_info_gtfs2",
"exclude": f"{BILHETAGEM_EXCLUDE} stops_gtfs routes_gtfs feed_info_gtfs",
}

BILHETAGEM_MATERIALIZACAO_TRANSACAO_PARAMS = {
Expand All @@ -1226,7 +1226,7 @@ class constants(Enum): # pylint: disable=c0103
},
"version": {},
},
"exclude": "integracao matriz_integracao stops_gtfs2 routes_gtfs2 feed_info_gtfs2",
"exclude": "integracao matriz_integracao stops_gtfs routes_gtfs feed_info_gtfs",
}

BILHETAGEM_MATERIALIZACAO_TRANSACAO_RIOCARD_PARAMS = {
Expand Down Expand Up @@ -1278,7 +1278,7 @@ class constants(Enum): # pylint: disable=c0103
}

# GTFS
GTFS_DATASET_ID = "br_rj_riodejaneiro_gtfs"
GTFS_DATASET_ID = "gtfs"

GTFS_GENERAL_CAPTURE_PARAMS = {
"partition_date_only": True,
Expand Down
2 changes: 1 addition & 1 deletion pipelines/rj_smtr/projeto_subsidio_sppo/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
dataset_id=unmapped(smtr_constants.SUBSIDIO_SPPO_DATASET_ID.value),
table_id=unmapped(smtr_constants.SUBSIDIO_SPPO_TABLE_ID.value),
upstream=unmapped(True),
exclude=unmapped("+gps_sppo +ordem_servico_trips_shapes_gtfs2"),
exclude=unmapped("+gps_sppo +ordem_servico_trips_shapes_gtfs"),
_vars=_vars,
)

Expand Down

0 comments on commit 675f87a

Please sign in to comment.