Module pipelines.rj_smtr.br_rj_riodejaneiro_rdo.utils
General purpose functions for the br_rj_riodejaneiro_rdo project
Functions
def build_table_id(mode: str, report_type: str)
-
Build table_id based on which table is the target of current flow run
Args
mode
:str
- SPPO or STPL
report_type
:str
- RHO or RDO
Returns
str
- table_id
def generate_ftp_schedules(interval_minutes: int, label: str = 'rj-smtr')
-
Generates IntervalClocks with the parameters needed to capture each report.
Args
interval_minutes
:int
- interval which this flow will be run.
label
:str
, optional- Prefect label, defines which agent to use when launching flow run.
Defaults to emd_constants.RJ_SMTR_AGENT_LABEL.value.
Returns
List(IntervalClock): containing the clocks for scheduling runs
def merge_file_info_and_errors(files: list, errors: list)
-
Args
files
:list
- List of dicts
errors
:list
- list of errors
Returns
list
- containing dicts with updated error