Chu
08/02/2022, 6:36 PMAnna Geller
prefect.context.parameters.get("parameter_name")
Chu
08/02/2022, 6:48 PMparams_during_flow_run = prefect.context.parameters.get("param_settings_by_org_id")
AttributeError: 'Context' object has no attribute 'parameters'
param_by_orgs = Parameter(
"some_params",
default = [
{
'organization_id': 'a',
'period_value': 1
},
{
'organization_id': 'b',
'period_value': 1
},
{
'organization_id': 'c',
'period_value': 1
}
]
)
## here I want to get the list of dictionary "some_params" in the run time, especially in the future, I may need to send parameters in Prefect UI, where it overwrites the default, thus I can't simply use param_by_orgs.default to retrieve the run time params
Anna Geller
Chu
08/02/2022, 8:59 PMAnna Geller
prefect.context.parameters.get("some_params")
Which syntax I can use to get current flow run's parameters value
and I answered it + pointed you to more resources