Does Prefect support multiple targets for a single...
# ask-community
a
Does Prefect support multiple targets for a single task? Trying to output multiple attributes from an object as csv rather than pickling the object itself and want to require all of them to be present to skip the task
k
Hey @An Hoang, sorry I’m not understanding. Do you mean multiple targets for a single task? I don’t think we have support for that. You would need to create that CSV yourself, or maybe make your own Serializer?
a
Sorry yes I mean multiple targets for single task. So you suggest either use the
Result
object in the task then do the checking of all the files to raise skip signal, or write the Serializer and put the logic there?
k
Oh I think I understand now. You want to use targets to check for the existence of multiple files and if they all exist, you want the data to be loaded and the task to be skipped right?
a
Yes!
k
Got it, unfortunately no we don’t have support for this. You probably need to load those files, check for the condition and then raise the SKIP flag yourself to skip the task like
raise SKIP()
👍 1