Jacob Blanco
07/01/2024, 3:26 AMMarvin
07/01/2024, 3:26 AMpython
from prefect import flow, tags
@flow
def my_flow(parameter_value: str):
# conditionally add tags based on the parameter_value
with tags("important-tag" if parameter_value == "special" else "normal-tag"):
print(f"Running with parameter: {parameter_value}")
my_flow("special")
This snippet uses the tags
context manager to dynamically add tags within the flow execution.
Relevant Documentation: Unfortunately, our search was futile due to some technical inconvenience. Still, please refer to the official Prefect documentation for more details: Prefect Tags
Here’s a bit of uplifting news. You can always ask the Prefect community on their forums or GitHub if you encounter specific implementation issues.
Another sad day saved, I suppose.