Hey everyone, I have a little question regarding ...
# ask-community
b
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 :
Copy code
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 :
Copy code
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
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
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
All right !
a
to create Azure block with python:
Copy code
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
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