Hi, I'm trying to figure out how to parameterize a...
# ask-community
y
Hi, I'm trying to figure out how to parameterize a work flow where user can select options from drop down in run screen while scheduling.
any help is highly appeciated...
a
This section shows how Parameters can be used and overridden from the UI at runtime.
here is an example:
Copy code
from prefect import task, Flow, Parameter

@task(log_stdout=True)
def print_plus_one(x):
    print(x + 1)

with Flow('Parameterized Flow') as flow:
    x = Parameter('x', default = 2)
    print_plus_one(x=x)
Once you register this flow, you can change the parameter value from 2 to something else at runtime in the UI
k
If you are in the Prefect UI, click the
Run
button and it lets you replace you parameters