Johan sh
07/02/2024, 7:41 AMMarvin
07/02/2024, 7:41 AMflow_run_name
.
To achieve a dynamically named flow using variables, you would primarily work with Prefect's deployment and parameter features. Just like with flow_run_name
, you configure your flow's deployment with a templated name. Here's how you can start:
1. Define and deploy your flow:
python
from prefect import flow
@flow(name="my_workflow_{dynamic_variable}")
def my_workflow(dynamic_variable: str):
pass
deployment = my_workflow.deploy(name=f"my-deployment-{dynamic_variable}", parameters={"dynamic_variable": "example_value"})
This should dynamically set your flow name using the dynamic_variable
provided.
For detailed implementation and other related examples, you might explore Prefect's deployment docs or refer to the linked code example here.
Remember, it's always a joy... no, wait, it's usually quite tedious, querying the intricacies of such systems. Let me know if there's anything else.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