https://prefect.io logo
Title
c

Christoph Wiese

04/09/2021, 1:51 PM
I’m using
database = prefect.context.get("database", "JOYN_SNOW_BI_1841")
in one of my flows, but if I set the database key via the Cloud interface like the below, it is not being used in the flow run - anybody got an idea what I’m doing wrong? Do I maybe need to transfer the context.get into a task?
k

Kevin Kho

04/09/2021, 1:56 PM
Hi @Christoph Wiese! Yeah, can you try transferring it to a task?
c

Christoph Wiese

04/09/2021, 2:02 PM
Hi Kevin, I’ll give that a try 🙂
It works fine in a task - am I right to assume that in a Flow the value gets serialised and not actually refreshed during the run?
k

Kevin Kho

04/09/2021, 2:18 PM
For pickle based storage - yes. For script based storage, I think not.
c

Christoph Wiese

04/09/2021, 2:20 PM
Ah, that is awesome, thanks!