Edmondo Porcu
05/05/2022, 5:46 PMwith Flow("mapped-fibonacci") as mapped_flow:
ms = Parameter("ms")
fib_nums = compute_large_fibonacci.map(ms)
flow_state = mapped_flow.run(ms=[10, 100, 1000, 1500])
nice but what about non array parameters? Let's say I have two parameters, one that's an array, and the other which is a constant.
with Flow("mapped-fibonacci") as mapped_flow:
ms = Parameter("ms")
ms2 = Parameter("ms2")
fib_nums = compute_large_fibonacci.map(ms, ms2)
flow_state = mapped_flow.run(ms=[10, 100, 1000, 1500])
Kevin Kho
Edmondo Porcu
05/05/2022, 5:59 PMKevin Kho
upstream_tasks=[unmapped(task_one)]
to force all the task_one to complete before task_twoEdmondo Porcu
05/05/2022, 6:05 PMKevin Kho
@task
. For the second, are the first ten tasks and second tasks different?Edmondo Porcu
05/05/2022, 6:50 PMEdmondo Porcu
05/05/2022, 6:51 PMKevin Kho
with Flow("example") as flow:
a = first_task()
b = second_task()
c = third_task(c_inputs, upstream_tasks=[a,b])
Edmondo Porcu
05/05/2022, 6:57 PM@task def third_task(c):
pass
Edmondo Porcu
05/05/2022, 6:58 PMKevin Kho
Edmondo Porcu
05/05/2022, 9:53 PMKevin Kho
EnvVarSecret
instead?Kevin Kho
Edmondo Porcu
05/05/2022, 11:02 PMEdmondo Porcu
05/05/2022, 11:51 PMKevin Kho
@task
def get_val(x):
if x == "test:
return os.environ["something"]
else:
return "something_else"
with Flow(...) as flow:
x = Parameter("x", "test")
get_val(x)