https://prefect.io logo
Title
m

Matt Fysh

04/06/2023, 1:45 AM
I want to store some state in a JSON block, but there needs to be an individual state per incoming flow parameter. Is it possible to create JSON blocks in the job? do I just wrap a
JSON.load(state/{mykey}
in a try, and then in the except block do
JSON(value={initvalue})
+
json_block.save
?
ok, I ended up implementing the try/except block to dynamically create the json block per input params, reused the cache key fn to hash the inputs into the block slug name.