Skip to content

Looping tasks in Prefect

I want to loop over tasks, again and again, until reaching a certain condition before continuing the rest of the workflow. What I have so far is this: But as far as I understand this does not work for multiple tasks. Is there a way to come back further and loop on several tasks at a time ? Answer The

Sort an array by occurances mongodb

Is it possible to sort an array by occurrences? For Example, given return I am able to get it most of the way there but I cannot figure out how to join them all back together in an array. I have been using an aggregation pipeline Starting with $match to find the site I want Then $unwind on with path:

how to add file names into dictionary based on their prefix?

I have a following problem. I have a list containing file names: I need to add them into dictionary based on their prefix number, i.e. 12 and 23. Each value of the dictionary should be a list containing all files with the same prefix. Desired output is: What I tried so far: However this gives me the result {&…