Channels
pacc-may-31-2023
prefect-ai
pacc-clearcover-june-12-2023
marvin-in-the-wild
data-ecosystem
geo-israel
pacc-june-14-2023
geo-japan
prefect-cloud
ppcc-may-16-2023
prefect-azure
prefect-docker
prefect-recipes
gratitude
geo-nyc
geo-bay-area
geo-boston
geo-london
geo-dc
geo-chicago
geo-berlin
geo-texas
geo-seattle
geo-colorado
prefect-community
data-tricks-and-tips
prefect-aws
prefect-gcp
introductions
find-a-prefect-job
prefect-dbt
random
events
ask-marvin
show-us-what-you-got
prefect-getting-started
prefect-integrations
prefect-contributors
best-practices-coordination-plane
announcements
prefect-server
prefect-ui
prefect-kubernetes
Powered by
Title
s
Satnam Singh
06/14/2022, 9:22 AM
Hey Prefect team I am using edge function in my prefect work flow here is code
✅ 1
I want the result of each task to pass to another task so that I receive the region object containing the result of each function
that is happening as well
but sometime the final result is with predict_fontsize
but sometimes it is with media_type function
I want region object/variable should contain the output of each function and the want to pass the region object to the region_processing function
I want this to happen while maintaining the parallelism
these functions are containing the aws fargate requests
a
Anna Geller
06/14/2022, 11:44 AM
There's a lot to unpack here: 1. You cannot use if/else in Prefect 1.0 - for that, you would need to use conditional tasks such as case - however, this is not the case in Prefect 2.0 - check
this for more details
2. You said you want parallelism - for that you would need to use mapping in Prefect 1.0
https://docs.prefect.io/core/concepts/mapping.html
3. Since you want branching + parallelism, check this topic: "
How to build conditional logic within mapped tasks?
"
👍 1
s
Satnam Singh
06/14/2022, 11:47 AM
thanks Anna
👍 1
a
Anna Geller
06/14/2022, 11:50 AM
@Satnam Singh
also just to be sure we understand each other when I say Prefect 2.0 or 1.0,
this page can help
s
Satnam Singh
06/14/2022, 11:51 AM
yes I got it, I will use if else is prefect 2.0
👍 1
2 Views
#prefect-community
Join Slack