Santiago Toso
11/04/2022, 10:26 AMyaml
file?
Asking mostly because I don't see it listed in the Deployment build options in the docs.
Thanks for your help!Jeff Hale
11/04/2022, 12:01 PM--param=som_param_value
or --params
and aJSON string. I show how in this video.Santiago Toso
11/09/2022, 2:55 PMparams
and it is not pushing the parameters to the deployment. I have to go to the UI and edit the deployment there. I tried three ways:
1. Adding --params='{"city_id": 56, "timezone": "US/Eastern", "agency_name": "COTA", "analysis_end": null, "analysis_start": null}'
to my prefect deployment build
command
2. Similarly adding --params '{"city_id": 56, "timezone": "US/Eastern", "agency_name": "COTA", "analysis_end": null, "analysis_start": null}'
to my prefect deployment build
command (almost the same as before but with no "=")
3. Deploying from a Python file:
# deployment.py
# This file hasn't been tested yet
from via_ds_amm_gtfs_real_time_tools.valhalla_map_matching.prefect_valhalla import \
gtfs_rt_conflation
from prefect.deployments import Deployment
from prefect.orion.schemas.schedules import CronSchedule
from prefect.blocks.core import Block
deployment = Deployment.build_from_flow(
flow=test_flow,
name="test",
parameters={"city_id": 56, "timezone": "US/Eastern", "agency_name": "COTA", "analysis_end": None, "analysis_start": None},
infra_overrides={},
work_queue_name="test",
tags=['T0', 'T1'],
schedule=(CronSchedule(cron="0 5 * * *", timezone="America/New_York")),
storage = Block.load("s3/bucket")
)
if __name__ == "__main__":
deployment.apply()
Jeff Hale
11/11/2022, 4:07 PMprefect version
?
• What’s your full deployment build command for method #1?Santiago Toso
11/11/2022, 4:45 PMprefect deployment build ./prefect_test.py:test_flow \
-n test_flow \
-sb s3/bucket \
-q test \
-o ./path_to.yaml \
-t T1 -t T2 \
--cron "0 3 * * *" \
--timezone "America/New_York" \
--params='{"city_id": 56, "timezone": "US/Eastern", "agency_name": "COTA", "analysis_end": null, "analysis_start": null}' \
--apply
Jeff Hale
11/11/2022, 4:46 PMprefect version
from the CLI - what’s the output?Santiago Toso
11/11/2022, 4:57 PMprefect version
is:Jeff Hale
11/11/2022, 5:18 PMSantiago Toso
11/14/2022, 8:15 AMparams
is the only things that doesn't go through. Everything else, including tags and cron schedule are correctly pushed.Jeff Hale
11/14/2022, 1:48 PMdef test_flow( …)
line of code?Santiago Toso
11/15/2022, 3:54 PMJeff Hale
11/15/2022, 3:58 PMSantiago Toso
11/15/2022, 4:02 PM