Alejandro Sanchez Losa
12/17/2021, 4:12 PMKevin Kho
Alejandro Sanchez Losa
12/17/2021, 4:14 PMAnna Geller
prefect.context.flow_id
Alejandro Sanchez Losa
12/17/2021, 4:18 PMAlejandro Sanchez Losa
12/17/2021, 4:19 PMAnna Geller
print(prefect.context.flow_id)
Alejandro Sanchez Losa
12/17/2021, 4:21 PMAnna Geller
Kevin Kho
flow.register()
will return the id.Alejandro Sanchez Losa
12/17/2021, 4:23 PMKevin Kho
Alejandro Sanchez Losa
12/17/2021, 4:29 PMAlejandro Sanchez Losa
12/17/2021, 4:29 PMAlejandro Sanchez Losa
12/17/2021, 4:29 PMAlejandro Sanchez Losa
12/17/2021, 4:30 PMAlejandro Sanchez Losa
12/17/2021, 4:35 PMAlejandro Sanchez Losa
12/17/2021, 4:35 PMKevin Kho
create_flow_run
in a script, just import it and call the .run()
method.
from prefect.tasks.prefect import create_flow_run
create_flow_run.run(flow_name="flow", project_name="project")
Alejandro Sanchez Losa
12/17/2021, 4:35 PMKevin Kho
version_group_id
instead which doesn’t change from registration to registrationAlejandro Sanchez Losa
12/17/2021, 4:36 PMAlejandro Sanchez Losa
12/17/2021, 4:41 PMAlejandro Sanchez Losa
12/17/2021, 4:41 PMKevin Kho
Alejandro Sanchez Losa
12/17/2021, 4:43 PMAlejandro Sanchez Losa
12/17/2021, 4:43 PMAlejandro Sanchez Losa
12/17/2021, 4:44 PMAlejandro Sanchez Losa
12/17/2021, 4:44 PMKevin Kho
Anna Geller
version: 2
jobs:
build:
docker:
- image: prefecthq/prefect:latest-python3.9
steps:
- checkout # checkout source code to working directory
- run: pip install .
- run: prefect auth login --key $PREFECT_API_KEY
- run: export PREFECT__CLOUD__USE_LOCAL_SECRETS=false && prefect register --project yourprojectname -p flows/ # -p sets the directory to your flows that should be registered
Alejandro Sanchez Losa
12/17/2021, 4:49 PMAnna Geller
Anna Geller
Alejandro Sanchez Losa
12/17/2021, 4:51 PMAlejandro Sanchez Losa
12/17/2021, 4:52 PMAlejandro Sanchez Losa
12/17/2021, 4:52 PM