https://prefect.io logo
Title
b

Benjamin.bgx

08/10/2022, 9:16 AM
Hey everyone, I have a little question regarding the block storage (and specifically the azure block storage). My understanding is we use the block as primary unit for prefect. There is two main use for them : 1. Store persistent logs 2. Store the flow I undertsand that with this python code I can define (and create the block) where I want to store the flow :
block = Azure(azure_storage_connection_string="paste_the_string_here")
block.save("dev")
and with that commande line I finalize the storage information for the flow :
prefect deployment build flow.py:flowname \
 --name deploy_name --tag dev -sb azure/dev
Can I do the same things from the UI ? In this case, I just need to use the command line and reference the block define in the UI. Am I right with all this assumptions ? And so, how I specify the storage for the persistent logs ? Thank you ! 🙂
o

Oscar Björhn

08/10/2022, 9:20 AM
Hey, You're right about the UI part, that's how I've done it, never creating or referring to the block from within my python code. Regarding your second question, I have no idea.
👍 2
a

Anna Geller

08/10/2022, 9:23 AM
storage for the persistent logs ?
logs are stored in the backend - if you're on Cloud, we handle that for you; if you're self-hosted, logs are persisted in your DB
b

Benjamin.bgx

08/10/2022, 9:25 AM
All right !
a

Anna Geller

08/10/2022, 9:25 AM
to create Azure block with python:
from prefect.filesystems import Azure

az = Azure(
    bucket_path="prefect/deployments",
    azure_storage_connection_string="...",
)
az.save("dev", overwrite=True)
here "dev" is block name
🙌 1
i

iñigo

10/24/2022, 4:01 PM
Hello, Thanks for the information. is there any guide on how to implement the part from the Azure? I understands how prefect needs to work and configure but I am not able to see which parameters I have to create or configure in azure.
thank you