Jasono
10/27/2020, 9:08 PMprefect.context
. In my config.toml, a context variable is defined like foo = "202010"
. In the task definition, it’s used like year = prefect.context.foo[:4]
but it causes int object is not subscriptable
error. Is there a way to make it work without doing str(foo[:4])
?Jim Crist-Harif
10/27/2020, 9:13 PMconfig.toml
are automatically loaded as integers unfortunately. If you add any non-numeric characters to that it would remain a string.Jasono
10/27/2020, 9:14 PMJim Crist-Harif
10/27/2020, 9:22 PMwith prefect.context(foo=...):
flow.run()
Jasono
10/27/2020, 9:22 PMJim Crist-Harif
10/27/2020, 9:23 PMParameter
tasks, or constants in the flow code.PREFECT__USER_CONFIG_PATH
Jasono
10/27/2020, 9:26 PM