Avkash Chauhan's Blog

Windows Azure, Windows 8, Cloud Computing, Big Data and Hadoop: All together at one place.. One problem, One solution at One time...

How you can store decimal data in Windows Azure Table Storage?

How you can store decimal data in Windows Azure Table Storage?

Rate This
  • Comments 2

At this point Windows Azure Table Storage does not support natively storing decimal point data as described in the below supported property types which is a subset of data types defined by the ADO.NET Data Services specification:


ADO.NET Data Services type

Common Language Runtime type




An array of bytes up to 64 KB in size.



A Boolean value.



A 64-bit value expressed as Coordinated Universal Time (UTC). The supported DateTime range begins from 12:00 midnight, January 1, 1601 A.D. (C.E.), UTC. The range ends at December 31, 9999.



A 64-bit floating point value.



A 128-bit globally unique identifier.


Int32 or int

A 32-bit integer.


Int64 or long

A 64-bit integer.



A UTF-16-encoded value. String values may be up to 64 KB in size. (Default Value)


While you can store your decimal data as string in the table and in your code you can use client library based serializer which supports decimal. So you can in effect use decimal by just changing the data type to PrimitiveTypeKind.String in your ReadingWritingEntityEvent handler.


Using custom attribute the solution becomes fairly convenient. For example, the entity classes just use the following code to get decimal data:


        public decimal Quantity { get; set; }


The above code just works fine with string type data but doesn’t work for other unsupported types like enums or TimeSpan.

Thanks to Windows Azure Product team for providing this information.


Leave a Comment
  • Please add 3 and 5 and type the answer here:
  • Post
  • Lucifure Stash is an alternate Azure table storage client, which supports arrays, enumerations, large data > 64KB, serialization, public and private properties and fields and more. It supports morphing capabilities such that you can easily store and retrieve any data type by transforming it into one of the Azure table storage supported datatypes.

    You can download Lucifure Stash, from http://www.lucifure.com via NuGet.

  • What is the assembly that defines this EntityDataType attribute?

Page 1 of 1 (2 items)