user584018
user584018

Reputation: 11304

Need to build a complex query for Azure Table to count number of rows

I am trying to run complex query for Azure Table where I want to count number of rows for all deviceID for specific dateiot and timeiot? Is this possible?

enter image description here

Upvotes: 0

Views: 117

Answers (1)

Gaurav Mantri
Gaurav Mantri

Reputation: 136196

Your query would be something like:

PartitionKey eq 'aaaa' and dateiot eq 'bbbb' and deviceID eq 'cccc' and timeiot eq 'dddd'

2 things though:

  1. This query will do a complete partition scan and may result in incomplete data in a single request. Your code should be able to handle continuation tokens to get all data matching the query.
  2. Table query does not support count functionality so you will get the entities back. You will need to add all entities to get the total count of entities matching the query.

Upvotes: 1

Related Questions