03/27/2020, 7:39 PM
Hello everyone! I'm using a
. Is it possible to access the results of the switch in a subsequent task? For example, I have a list of data (some of which contain latitude/longitude and others don't). My switch consists of getting lat/long for the records that are missing it, while records that do have coordinates are simply returned. How can I access the final, joined list after the switch?
Based on your example, I want to do something like this:
x=switch(condition, dict(a=a_branch, b=b_branch))

Kyle Moon-Wright

03/27/2020, 8:23 PM
Hmm, perhaps Prefect’s Mapping would be more conducive to your use case, where the mapper has the conditional logic as to whether the coordinates are present? The switch statement that you listed above will return a list of the tasks in the flow and their statuses.