does prefect-cli support dynamic passing of vars f...
# ask-community
c
does prefect-cli support dynamic passing of vars for one-off flow runs? Sometimes our usecase requires adhoc execution with custom parameters (sometimes running a whole pipeline is not time efficient or necessary, like if a smaller date range needs to be backfilled etc.).
s
Of course,
Parameters
are a first class feature
k
The Prefect CLI
run
command allows you to add parameters
You need to use a file or escaped JSON at the moment
c
okay I just want to clarify the docs real quick:
JSON String overwrites JSON file; either one takes precedent over existing var calls in the flow correct? If so, neat that's exactly what I'm looking for!
k
Yes to takes precedence. Do you mean you want to supply both a file and a string and have the string override the file?
--parameters-file is a separate file with json
c
Oh my bad! I didn't mean to imply I was trying to use both at once, I just wanted to clarify the snippet in the doc you linked about how one overwrites the other
k
These supplied parameters override the ones in the Python file, if that’s what you meant. Yep!