Skip to content

Commit

Permalink
Subida de gtfs de antes da alteração das faixas horarias (#304)
Browse files Browse the repository at this point in the history
* adiciona colunas antigas do gtfs para antes da alteração das faixas

* Aadiciona #noqa nos nomes das colunas

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
vtr363 and mergify[bot] authored Nov 6, 2024
1 parent 32df407 commit 93eca80
Show file tree
Hide file tree
Showing 4 changed files with 298 additions and 278 deletions.
5 changes: 5 additions & 0 deletions pipelines/migration/br_rj_riodejaneiro_gtfs/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,16 @@
filename=unmapped(filename),
)

data_versao_gtfs_str = parse_timestamp_to_string(
timestamp=data_versao_gtfs_task, pattern="%Y-%m-%d"
)

raw_filepaths, primary_keys = get_raw_gtfs_files(
os_control=os_control,
local_filepath=local_filepaths,
regular_sheet_index=regular_sheet_index,
upload_from_gcs=upload_from_gcs,
data_versao_gtfs=data_versao_gtfs_str,
)

transform_raw_to_nested_structure_results = transform_raw_to_nested_structure.map(
Expand Down
7 changes: 6 additions & 1 deletion pipelines/migration/br_rj_riodejaneiro_gtfs/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@ def get_os_info(last_captured_os: str = None, data_versao_gtfs: str = None) -> d

@task(nout=2)
def get_raw_gtfs_files(
os_control, local_filepath: list, regular_sheet_index: int = None, upload_from_gcs: bool = False
os_control,
local_filepath: list,
regular_sheet_index: int = None,
upload_from_gcs: bool = False,
data_versao_gtfs: str = None,
):
"""
Downloads raw files and processes them.
Expand Down Expand Up @@ -241,6 +245,7 @@ def get_raw_gtfs_files(
file_bytes=file_bytes_os,
local_filepath=local_filepath,
raw_filepaths=raw_filepaths,
data_versao_gtfs=data_versao_gtfs,
)

else:
Expand Down
Loading

0 comments on commit 93eca80

Please sign in to comment.