An Azure service that stores unstructured data in the cloud as blobs.
what is DEST_FILE ? file path that we want to download?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
If I want to read/revise a blob in a container, do I need to download to vm to read/revise it? Or can I just read/revise it through any other methods like blob service etc?
As I saw the legacy SDK was able to do it like get_blob_to_stream in azure.storage.blob.baseblobservice. Is there new SDK that can achieve the similar results?
Thanks!
An Azure service that stores unstructured data in the cloud as blobs.
what is DEST_FILE ? file path that we want to download?
@Nate Lo Yih-Shiou You have that option ! If you want to read a blob into a stream. There’s an equivalent method in the new version.
Please refer to this article: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-storage-blob/12.3.2/azure.storage.blob.html#azure.storage.blob.BlobClient.download_blob
with open(DEST_FILE, "wb") as my_blob:
download_stream = blob_client.download_blob()
download_stream.readinto(my_blob)
However, if you want to modify only part of a blob, let's say a block of a block blob. You don't have to download the whole blob then you should be able to update only a block.
Hope this helps!
Kindly let us know if the above helps or you need further assistance on this issue.
-----------------------------------------------------------------------------------------------------------------------------------------
Please don’t forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.