James Phoenix
04/28/2022, 10:12 AMAnna Geller
04/28/2022, 10:58 AMCurrently what python methods/GraphQL should we use to update the state of individual task runs inside of flow runs?You could do that using Prefect client:
from prefect import Client
client = Client()
results = client.graphql(query)
and query could me either query or a mutation e.g. to change the task run statesJames Phoenix
04/28/2022, 12:19 PMAnna Geller
04/28/2022, 1:51 PMJames Phoenix
04/28/2022, 2:04 PMtask_runs ids
from one map function downstream into another map task? 🙏Anna Geller
04/28/2022, 3:38 PMfrom prefect import Flow, task
@task
def add_ten(x):
return x + 10
with Flow('iterated map') as flow:
mapped_result = add_ten.map([1, 2, 3])
mapped_result_2 = add_ten.map(mapped_result)
James Phoenix
04/28/2022, 4:21 PM