Query Blob Content: Query CSV Syntax

Muneeb Mirza 41 Reputation points

I checked this API https://learn.microsoft.com/en-us/rest/api/storageservices/query-blob-contents and ran it. I was able to get complete CSV file that is stored in Azure Blob Storage.

This API also says we can request with a query


I am sending query as

<Expression>limit 5</Expression>

My blob is a CSV file and link mentioned above says it accepts SQL query, but I am unsure what will be used as table name or how the query will look like.

For example, if I have a csv file named custom_data.csv, suppose it has columns id, name, description, order how can I write a query saying bring me records where

  1. id=123
  2. name like '%john%'

if it is SQL, then what is to be added in FROM, can I get a proper example here?


Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,489 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vaibhav Chaudhari 38,651 Reputation points

    Try providing complete SQL query like below. If the file is CSV, table name will be "BlobStorage"

    SELECT * FROM BlobStorage LIMIT 5

    See the examples here to use in Expression:



    Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav

    1 person found this answer helpful.