Hello - is it possible to schedule/deploy to step...
# ask-metaflow
g
Hello - is it possible to schedule/deploy to step functions a flow and provide parameters via
... step-functions create --my-param hi
so that every-time the flow is executed based on
@schedule
it gets the same params that I have specified? I won't be using
step-functions trigger
because I am scheduling.
1
s
not today - although you could read from a config file within deploy-time parameters to achieve a similar outcome.
g
@square-wire-39606 OK - I have three sets of parameters per environment (dev, staging, prod) - is there a place I can read the environment and then load config using
IncludeFile
based on that value?
a
You could do that in the
start
step
1
or you could use
branch
in the context for deploy time parameters
g
Oh and read the env from environment vars
a
yep
g
I can specify env var upon step create?
a
something of the order of
python flow.py --branch test step-functions create
and then within deploy time parameters read the value from your config file that pertains to the value of
context.branch
g
My setup is a little different. I have three metaflow deployments in three accounts corresponding to env. Is there a way to pass env variable in via cli command
python flow.py --env-vars {'env': 'dev'} step-functions create
type thing?
a
you can pass environment variables to metaflow task by using the
@environment
decorator, if that's what you are looking for
What is the end goal that you are trying to achieve?
happy to jump on a quick call!
g
I have a flow that can be deployed and scheduled via step funcs to three separate metaflow deployments and each has different set of parameters (configuration)
b
@square-wire-39606 is this something that would be deployed in the near future, the ability to pass in parameters when creating step function with a schedule? It would be incredibly nice feature to have
a
@bland-energy-98079 the default values of the parameters are passed when creating the step function. you can rely on deploy time functions to tweak the values of parameters that are submitted
i
Another simple solution that works for me (and is compatible with my constraints) is to specify the parameters in the EventBridge rule.