Alex Furrier
09/02/2021, 5:48 PM@task
def gen_records():
return [('item', 1), ('item', 2), ('item', 3)]
@task
def subscript_input(x, y):
return x+str(y)
with Flow(
name="Test Flow",
) as test_flow:
records = gen_records()
total = subscript_input.map(x=records[0], y=records[1])
Kevin Kho
records
is of type List[Tuple]
so records[0]
would just be the first tuple. You need to pass in the Tuple
to subscript_input
or split them out with in intermediate task to list of item
and a list of the numbers so the you can supply both when mapping.Alex Furrier
09/02/2021, 5:52 PM