Jeff S
03/14/2025, 3:13 PMVariable.get("var")
it's null when the flow runs. My job variable for that deployment is { "var":"test" )
. Is there a different approach I should take?Nate
03/14/2025, 3:26 PMNate
03/14/2025, 3:27 PMNate
03/14/2025, 3:28 PMJeff S
03/14/2025, 3:37 PMJeff S
03/14/2025, 3:48 PMJeff S
03/14/2025, 5:21 PMNate
03/14/2025, 5:32 PMNate
03/14/2025, 5:34 PMenv
is always there, so you can set something in env
at deployment or flow run creation time if you want that value and then access it from os.getenv
(or whatever other thing would use the environment) in your flow run
• Variables are a standalone feature that is effectively a global KV, and while job variables can be set to a variable value (that we will render), Variables and job variables arent quite exactly the same thing
can you clarify which thing you're looking for?Jeff S
03/14/2025, 6:06 PMJeff S
03/14/2025, 6:07 PMNate
03/14/2025, 6:07 PMJeff S
03/14/2025, 6:07 PMNate
03/14/2025, 6:09 PM"image": "prefecthq/prefect:3-python3.12"
or instead
"env": {"FOO": "bar"}
image
is a job variable on some work pool types (like docker, k8s, ECS ie containerized work pool types)
env
is present on all work pool types, and whatever you put in there will be set as an environment variable in the environment of your eventual flow run
https://docs.prefect.io/v3/deploy/infrastructure-concepts/customizeJeff S
03/14/2025, 6:10 PMJeff S
03/14/2025, 6:11 PMJeff S
03/14/2025, 6:11 PM