Ben Muller
10/19/2021, 12:44 AMwith Flow(
name="horse_racing_data",
) as flow:
dates = get_dates_task(days_back=days_back, days_ahead=days_ahead, dt_format="%d-%b-%Y")
raw_sectional_data = apply_map(get_puntingform_sectional_dump_task, date=dates)
spell_stats_data = apply_map(
query_db_for_df_task, path_to_sql=unmapped("sql/select_spell_count.sql")
)
enriched_pf_data = apply_map(
calculate_runners_spell_stats_task, pf_sectional_df=raw_sectional_data, spell_data=spell_stats_data
)
I am making multiple separate apply_map
calls and I just wanted to make sure if I can guarantee that when calling calculate_runners_spell_stats_task
I can guarantee the order of the returned maps?
What i mean is that raw_sectional_data
and spell_stats_data
are iterables and as they are provided to the function it is important that they maintain the same order.
Am I all good here?Kevin Kho
apply_map
over map? Seems like you only have one task per apply map? I think that order is guaranteed though. Order for mapped task is guaranteed and I went over the code and all it does is unpack the apply_map
and make a flow for it. Just note that the lengths should be equal per these commentsBen Muller
10/19/2021, 1:30 AMBen Muller
10/19/2021, 1:31 AMKevin Kho
inc_or_negate
is not a task. It’s a function that uses tasks.Ben Muller
10/19/2021, 1:33 AMKevin Kho
Kevin Kho
Ben Muller
10/19/2021, 1:35 AMBen Muller
10/19/2021, 1:39 AMBen Muller
10/19/2021, 1:54 AMBen Muller
10/19/2021, 1:54 AMBen Muller
10/19/2021, 1:57 AMKevin Kho
Ben Muller
10/19/2021, 2:02 AMKevin Kho