golden nugget online

Working With Blobs In Azure

In this article, we’ll be working with blob in Azure. In the previous article, Azure Blob Storage, we learnt about the Azure Blob Storage and learnt to create a storage account in Azure. Here, we’ll do some exploration with the possibility with Blob. We’ll be creating container learn how to upload data to the blob, download the data and then block delete the blob.  

Azure Blob Storage  

Azure Blob Storage is used designed by Microsoft for the process of object storage in cloud. The blob storage has the capacity to store huge amount of data, majorly the unstructured data When we talk about the unstructured data it basically means that the data doesn’t follow or are setup in any particular model and definition like binary data and text.   

Pre-requisite 

First and foremost, you would need to setup an Azure Storage Account. You can do that following the previous article, Azure Blob Storage.  

Now, let us explore working with Blob in Azure. 

Step 1 

Follow the pre-requisite and then you’ll have a storage account setup. Mine is named as ojashblob. 

Click on your storage account and you’ll be taken to the page. 

Creating Container 

Step 2 

On the left-hand side, Under Data Storage Click on Containers.  

Now, as you are taken to the Containers page, Click on + Container. 

Here, you’d need to fill some detail in and select the Public Access Level.  

I’ve named mine ojash-container and set the public access level to Container (anonymous read access for containers and blobs) 

Once, set, click on Create.  

Upload Blob 

Step 3 

We are notified about the container creation. 

With this on the container page, we can see the golden nugget online container that we created listed.  

Click on it.  

Now, Select Upload.  

We are taken to selection of file. Click on the file folder icon.  

We can now select any image or text file from our system. 

Here, I’ve selected an image named “1692333.jpg”. 

The authentication is set to Account Key, Blob type as Block blob and Hot Access Tier.  

Now, Click on Upload.  

As the upload is successful, we are notified of it.  

Step 4 

On the container page, we can see the image file listen and its details.  

Click on it to find more details about it.  

Download Blob 

Step 5 

Blob can be download by clicking on the blob and selecting the Download button.  

Another way is to tick mark the blobs and right-click to select the Download option.  

Block Blob Upload 

Step 6 

To upload blob in bulk, click on the Upload Button.  

Now, when we select the folder button, we select multiple files. 

Here I have three text files of different sizes. 

Now, click on Upload.  

We can now see; the blob texts are all uploaded to the container – all at once.  

Similarly, we can download these blobs too.  

Deleting Blob 

Step 7 

Now, on the container page, select all the blob you want to delete.  

Next, click on Delete button.  

We are now asked for confirmation. Click on Ok.  

Step 8 

We can now see the success notification.  

We have now successfully deleted all the text blobs.  

Deleting Blob Storage and Resources 

Step 9 

Finally, as we are done with our task, we can now delete the storage account from the storage account page or the entire resource group itself.  

Simply visit the page and click on Delete. For the resource group, we’d need to retype the resource group name.  

Conclusion 

Thus, in this article, we learnt to work with Blobs. We create storage account, setup container and then upload blob to the container. Then we also learnt to download the data and delete the blob both individually and in block.