azure-sdk-for-js: Looking for example and more information on BlobServiceClient.findBlobsByTags() and BlockBlobClient.query() APIs

Query/Question How can we help?

Environment:

  • Name and version of the Library package used: [e.g. Azure.Storage.Blobs 12.2.0] @azure/storage-blob@12.4.0
  • Hosting platform or OS and .NET runtime version (dotnet --info output for .NET Core projects): [e.g. Azure AppService or Windows 10 .NET Framework 4.8]
  • IDE and version : [e.g. Visual Studio 16.3]
  1. We are looking for complete example for BlobServiceClient.findBlobsByTags() usage in the implementation. We have tried searching but could not find any example format for the tagFilterSqlExpression parameter. Also, looking for exact use case reference for using the tags for the blobs.

  2. We are looking for complete example for BlockBlobClient.query() usage in the implementation. We have tried searching but could not find any example for searching the blob content data. Also, looking for exact use case reference for using the query for searching the blob content.

  • Also, please share the reference for the query language used.
  • For Example:
    • Blob Name: Expenses_Month _Wise_Year_2020.csv - this file contains all the expenses occurred in every month where Month is column.
      • Blob Name: Income_Month _Wise_Year_2020.csv - this file contains all the incomes from every month where Month is column.
    • Use Case 1: Retrieve the blobs which has the value as January where the column name is Month using query. (retrieving the blobs from the Container based on blobs data)
    • Use Case 2: Retrieve the blob data which has the value as January where the column name is Month.(retrieving data from single blob)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 20 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Like I said, could you please refer to the linked test cases for example for now? We probably won’t add samples for these two features until they are GA.

https://github.com/Azure/azure-sdk-for-js/blob/388c649b281981dbef5b1bb519195c4ffdc74d17/sdk/storage/storage-blob/test/blobserviceclient.spec.ts#L474-L550

The sequences are

  • create blob with tags (key value pairs) or call setTags() after creation
  • call BlobServiceClient.findBlobsByTags(), the result type is just like that of listBlobs. It can be scoped to a particular container with @container = 'videofiles'.

Thank you @ljian3377, The example for BlobServiceClient.findBlobsByTags() working as expected.

Now only we only need steps for Enable query acceleration from UI. If you could provide some inputs that will help us.