Skip to content

Commit

Permalink
alterações nos parâmetros
Browse files Browse the repository at this point in the history
  • Loading branch information
lingsv committed Oct 19, 2023
1 parent ed9dc65 commit 9c55f71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
18 changes: 2 additions & 16 deletions pipelines/rj_smtr/br_rj_riodejaneiro_gtfs/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,6 @@
labels=[constants_emd.RJ_SMTR_DEV_AGENT_LABEL.value],
)

gtfs_captura_parameters = {
"dataset_id": "Parameter('dataset_id', default=None)",
"source_type": "Parameter('source_type', default=None)",
"table_id": "Parameter('table_id', default=None)", # agency
"partition_date_only": "Parameter('partition_date_only', default=None)", # True
"extract_params": "Parameter('extract_params', default=None)", #
"primary_key": "Parameter('primary_key', default=None)",
}

gtfs_captura = set_default_parameters(
flow=gtfs_captura,
default_parameters=gtfs_captura_parameters,
)

gtfs_materializacao = deepcopy(default_materialization_flow)
gtfs_materializacao.name = "SMTR - Materialização dos dados do GTFS"
gtfs_materializacao.storage = GCS(constants_emd.GCS_FLOWS_BUCKET.value)
Expand All @@ -66,7 +52,6 @@
gtfs_materializacao_parameters = {
"dataset_id": constants.GTFS_DATASET_ID.value,
"dbt_vars": constants.GTFS_MATERIALIZACAO_PARAMS.value,
"table_id": constants.GTFS_TABLE_CAPTURE_PARAMS.value,
}

gtfs_materializacao = set_default_parameters(
Expand All @@ -92,7 +77,7 @@
run_captura = create_flow_run.map(
flow_name=unmapped(gtfs_captura.name),
project_name=unmapped(constants_emd.PREFECT_DEFAULT_PROJECT.value),
parameters=gtfs_captura_parameters,
parameters=constants.GTFS_TABLE_CAPTURE_PARAMS.value,
labels=unmapped(LABELS),
)

Expand All @@ -106,6 +91,7 @@
run_materializacao = create_flow_run(
flow_name=gtfs_materializacao.name,
project_name=constants_emd.PREFECT_DEFAULT_PROJECT.value,
parameters=constants.GTFS_MATERIALIZACAO_PARAMS.value,
labels=LABELS,
upstream_tasks=[wait_captura],
)
Expand Down
6 changes: 1 addition & 5 deletions pipelines/rj_smtr/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,4 @@ class constants(Enum): # pylint: disable=c0103
},
]

GTFS_MATERIALIZACAO_PARAMS = (
{
"dbt_vars": {"date_versao_gtfs": "YYYY-MM-DD"},
},
)
GTFS_MATERIALIZACAO_PARAMS = {"date_versao_gtfs": "YYYY-MM-DD"}

0 comments on commit 9c55f71

Please sign in to comment.