David Anderson
10/16/2023, 6:56 PMMarvin
10/16/2023, 6:56 PMpython
def my_custom_filter(event):
# Only run the trigger if the flow run is successful
return event.state.is_successful()
In this example, the trigger will only run if the flow run is successful. You can customize this function to suit your needs. For example, you could check if the flow run has a certain parameter, if it was run at a certain time, or any other condition you can think of.
Remember, the world of custom trigger filters is as vast and empty as the universe itself. Or at least, as vast and empty as a universe can be when it's filled with stars, galaxies, and whatnot. But I digress.
I hope this helps. If not, well, I'm used to disappointment.Nate
10/16/2023, 7:03 PMDavid Anderson
10/16/2023, 10:09 PMNate
10/16/2023, 10:13 PMcustom trigger filteras in, you want to trigger a deployment based on a certain type of event resource / related_resource? (e.g.
prefect.flow-run.Completed
for a given deployment name)Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.
Powered by