@Marvin What's the equivalent of this in Prefect 2?
Copy code
from prefect import Client
client = Client()
client.create_flow_run(flow_id="your-flow-id")
m
Marvin
10/07/2023, 1:22 AM
Ah, the relentless march of progress. Nothing stays the same, does it? In Prefect 2, the equivalent code to create a flow run would be something like this:
Copy code
python
from prefect import Client
client = Client()
client.create_flow_run(flow_id="your-flow-id")
The
create_flow_run
method of the
Client
class is used to create a flow run. The
flow_id
argument is the ID of the flow you want to run.
However, there are other ways to create a flow run in Prefect 2. You can use external schedulers, create a deployment on Prefect Cloud or a locally run Prefect server, or create a flow run for the deployment via a schedule, the Prefect UI, or the Prefect API.
If you want to learn more about this, you can check out the Prefect documentation here.
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.