Is it possible to retrieve the Top n records from the Azure Table Storage using C#? I'm using .NET Core.
It would be great if I can get some references as well.
Please note that all my entities are stored using the Log Tail Pattern https://docs.microsoft.com/en-us/azure/cosmos-db/table-storage-design-guide#log-tail-pattern
Thanks, Praveen
Enter an Account Name, Account Key, and Table Name on the Azure Table tab of the New Session dialog. Select either HTTP or HTTPS as the connection Protocol. Ensure that the Analysis Grid viewer is selected in the Start With drop-down list. Start retrieving data by clicking the Start button in the New Session dialog.
The row key is a unique identifier for an entity within a given partition. Together the PartitionKey and RowKey uniquely identify every entity within a table. The row key is a string value that may be up to 1 KiB in size. You must include the RowKey property in every insert, update, and delete operation.
You can use Take() method when creating your TableQuery:
TableQuery<T> query = new TableQuery<T>().Take(takeCount);
Or set the property TakeCount to specify it:
TableQuery<T> query = new TableQuery<T>();
query.TakeCount = takeCount;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With