Book a Demo Free Trial

Search Azure Storage blobs by Tags

Ranjith Eswaran

Feb 17, 2022

Category: Azure Storage

Introduction

Azure Storage Account allows the users to store all kinds of data including structured, semi structured and unstructured data through services like tables, queues, blobs and files. Storage blobs are used to store all forms of unstructured data. In this blog we will learn about how Cerebrata can be used to search the blobs based on the tags defined on them within a Storage container.

Storage Blobs

Azure storage blob is Microsoft’s object storage solution in cloud. It is used to store all kinds of unstructured data. It is optimized to store massive amount of unstructured data. Unstructured data is a data that doesn’t adhere to a predefined data model or structure. For example, text or binary data. It is used for serving images and documents directly to browsers, streaming audio and video, storing data for distributed access. Users or client applications can access the data stored in the blobs through HTTP/HTTPS from anywhere in the world.

Blob Tags

Blob index tags categorize data in your storage account using key-value tag attributes. These tags are automatically indexed and exposed as a searchable multi-dimensional index to easily find data. So blob tags can be used to group and search related blobs in an efficient manner. For example, you can store all your production and QA data in the same storage blob container but with different tags like Environment = Prod and Environment = QA.  The blob tags can modified or deleted at any point in time.

azure blob tags

How tags helps in searching the blobs?

Since Azure Storage blob is designed to hold enormous amount of data, it should be very easy for us to filter the required blobs while listing the blobs in a container. Azure storage allows us to filter the blobs in a container based on the prefix. So it is possible to list the blobs in a container whose name starts with the provided text. But it Is not always possible to create related blobs with same prefix. Another disadvantage here is that we can list the blobs starting with only one prefix at a time

Azure solves this problem by listing the blobs based on the tags created on them. It solves the problem caused by listing the blobs based prefixes. We can create tags with same key and value for related tags. It is also possible to create more than one tag for a single blob. So we can filter the blobs in a container that contains the required tags. It is also possible to apply the numeric operations like >, <, >= and <= for the tag values holding numeric values.

Searching the blobs using Cerebrata

Cerebrata allows the users to list the blobs in a storage blob container. Cerebrata also supports filtering the blobs based on any of the following.

  • Name
  • Tag

Search by name

We can list the blobs in a storage container based on their name by either prefix or a segment of their name. In Azure portal and Azure Storage explorer, it is possible to list the blobs only based on the prefix and not by the other parts of the name.

To search the blobs based on the name, please follow the below steps.

  1. Navigate into the required storage account in the associated subscriptions.
  2. Expand the Blob containers node within the Primary node inside the Storage account.
  3. All the blob containers in that storage account will be listed.
  4. Double click on the required blob container to list the blobs.
  5. Select the Search button found in the button bar.
  6. Select the Search by name It will be selected by default
  7. You can choose either to search the blobs based on prefix or any other part of the name
  8. Select the Search button to initiate the search
  9. Blobs matching the provided condition will be listed

azure blob storage indexing

Search by tags

We can list the blobs based on the tags created on them by following the below steps

  1. Navigate into the required storage account in the associated subscriptions.
  2. Expand the Blob containers node within the Primary node inside the Storage account.
  3. All the blob containers in that storage account will be listed.
  4. Double click on the required blob container to list the blobs.
  5. Select the Search button found in the button bar.
  6. Select the Search by tags
  7. Provide the required tag name, tag value and the condition.

azure blob storage index tags

         8.You can also search by more than one tag by selecting the add button.

azure blob tags

9.Select the Search button to initiate the search.

10.Blobs matching the provided condition will be listed.

Interesting features on Azure Storage blobs

  • Change the access tier of the blobs of a container in bulk
  • Set properties of more than one blob in a single operation
  • Change the access tier of snapshots and versions in bulk
  • Copy blobs from one container to another

These are some of the important capabilities of Cerebrata in managing the blobs in a Storage account container.

Conclusion

In this post we saw how you can search the blobs in a container using Cerebrata. Cerebrata provides most comprehensive set of features for managing storage blobs, file shares and table entities.

Other than that, Cerebrata has best-of-the-breed management features for Azure Service Bus, Cosmos DB, Cognitive Search, Redis Cache and more. You can learn more about the available features on our website at https://www.cerebrata.com/.