Hi everyone!
I'm looking to add some metadata to my flow runs or deployments, like developer contact info and a brief description. I know there's a description field for deployments, but I need something that other flows can easily parse and use programatically. I thought about using a JSON block for each deployment that can be called by using the deployment ID, but it feels a bit messy and inefficient. Also thought of using tags but I don't think it would be appropiate for my use case.
Has anyone else dealt with this? How did you solve it?
✅ 1
c
Chris White
09/03/2024, 6:02 PM
Hey Lucas! I think prefect Variables are a good fit for what you're describing -- they're basically super lightweight JSON blocks.
Copy code
from prefect.variables import Variable
var = Variable.set(name="test", value=dict(x=42))
var_value = Variable.get("test") # returns the dictionary
^^^ this code is valid in 3.0+, for 2.x the value is required to be a string (so maybe the output of
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.