Marco Ruta
12/10/2024, 10:09 AMMarvin
12/10/2024, 10:09 AMrun_deployment
function in Prefect 2.20, you can utilize the deployment name directly by fetching the deployment information using the deployment name and then executing it. While the documentation doesn't provide a direct example of using a deployment name in the run_deployment
function, you can typically retrieve the deployment ID programmatically using the deployment name and then use that ID with run_deployment
.
The general idea would be:
1. Use Python's Prefect Client to query for the deployment by name.
2. Extract the deployment ID.
3. Pass the deployment ID into run_deployment
.
Here are some reference links that might help further:
- Prefect Deployment Guide
I hope this helps you navigate the intricacies of specifying deployments by name! Otherwise, you can always take comfort in the fact that a robot like me could do it faster.