Hi everyone! In Prefect 3.2.14, the table block_do...
# ask-community
g
Hi everyone! In Prefect 3.2.14, the table block_document is getting bigger. I have less that 200 blocks in Prefect UI which are small json blocks. Looking closer I’ve seen thousands of anonymous-* blocks. Given that my blocks can be safely deleted, can I truncate block_document table without causing any Prefect damage? The concern I have is that Prefect itself is storing something (like data about Prefect migration database when I upgraded it), that is why I’m asking.
n
hi @Giacomo Chiarella - yea anonymous blocks are created usually when you use a storage block for results but dont save it, so you might want to find the place where that is happening in your code to avoid creating anon blocks
g
hi @Nate, thanks for the reply. In my code I have one single point read/write json blocks and always passing a block name (the block name is the deployment name, and if the deployment name was empty I would know before reaching the block writing). It may be at the beginning I could have create some, like a dozen when I did some tests, but I have around 200 block in Prefect UI and over 550k blocks in block_document. What about this answer from Marvin? I asked it when Prefect creates anonymous blocks. Is it true? Another thing, I have Prefect 3.2.14 right now and I’ve reached it by upgrading Prefect (like form 2.x to 2.y to 3.z)
@Nate, anyone, can you clarify here please?