I am trying to retrieve data from azure data table using the rest api.The Url looks something like this.
https://<service-url>/Customers(PartitionKey='MyPartition')
The Api error's out with Invalid data.
If I add RowKey as well along with PartitionKey something like this. It works.
https://<service-url>/Customers(PartitionKey='MyPartition',RowKey='MyRowKey1')
Is it necessary to pass the RowKey?
What If I just want to retrieve all data from one partition. I know, we can add a $filter in the query parameter but wouldn't it cause performance issue?
Please share your ideas.
Thanks!
Yes, you need to specify both the PartitionKey
and RowKey
when using this format https://<service-url>/Customers(xxx)
.
When using $filter
in the query, as per my test(about 100 records), there's no more difference in time consuming. And I also try to use SDK
to query just by specifying PartitionKey
, and I can see it automatically use $filter
in the backend(by using the tool Fiddler).