Jackson Nguyen
01/28/2025, 8:47 PMMarvin
01/28/2025, 8:47 PMrun_deployment()
. Typically, when you run a deployment, the flow's results are not directly accessible like they would be if you called the flow function directly.
However, you can retrieve the results of a flow run by accessing the flow run's state after it completes. This involves interacting with the Prefect API to query the state of the flow run, which contains the results.
Here is a general approach you might take:
1. Run the Deployment: Use run_deployment()
to execute the deployment.
2. Retrieve Flow Run State: Use the Prefect client to query the state of the flow run. This state will include the result of the flow if it completed successfully.
For more precise guidance, you might need to reference the Prefect API documentation or explore the Prefect client capabilities to interact with flow runs and their states. If you're interested in the detailed API usage, you could explore the Prefect client module for querying flow run states.Nate
01/28/2025, 8:47 PMflow_run.state.result()
if and only if that flow has persisted its resultsJackson Nguyen
01/28/2025, 8:49 PMNate
01/28/2025, 8:53 PMNate
01/28/2025, 8:53 PMJackson Nguyen
01/28/2025, 8:56 PM