I suspect so, as the abstract class TableServiceEntity have the following:
public virtual string PartitionKey { get; set; }
public virtual string RowKey { get; set; }
What if I want a RowKey that is a DateTime or a Double?
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.
Azure Table storage is a service that stores non-relational structured data (also known as structured NoSQL data) in the cloud, providing a key/attribute store with a schemaless design. Because Table storage is schemaless, it's easy to adapt your data as the needs of your application evolve.
PartitionKey, RowKey, Timestamp. These three properties are required for each Azure table entry.
How should you choose a good partition key for a Table storage implementation? (Choose all that apply.) They should always be unique, like a primary key in a SQL table. You should always use the same partition key for all records. Think about how you're likely to update the data using batch transactions.
yes, these are both strings.
If you want the RowKey to be a DateTime or a Double then you must use a string representation.
There are a few common patterns for this. For DateTime, it's common to see the DateTime represented using a string that is conveniently sorted:
or
See this blog post from Steve Marx - http://blog.smarx.com/posts/using-numbers-as-keys-in-windows-azure
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