Brief overview of Azure DocumentDB Document Properties

When you create a document in Azure DocumentDB, regardless of properties in the document, Azure creates and populates some default properties behind the scene for the document. Here is a brief overview of document properties:

_RID: Indicates unique resource identifier. Each document in Azure DocumentDB must have a unique string identifier (across the collection) which can be changed over the time and is specified in the document; However, _RID is generated by Azure and cannot be changed over the time.

_TS: Indicates the last time when document gets modified. Azure updates the value when you modify the document.  This can be very useful for  your application to get latest changes and updates after specific date.

_SELF: Unique addressable URI of the resource. Here is an example of the _SELF link:
dbs/DppTAA==/colls/DppTAvdAA=/docs/DppTAMYvdAABAAAAAAA==/
As you can see it starts with dbs and database Resource ID and then Colls and the collection Resource ID and finally docs and the document _RID identifier.

_ETAG: _ETAGs are used by Azure to manage optimistic concurrency and avoid users override each others’ changes. Stas Kondratyev posted a comprehensive article about _ETAGS here.

_ATTACHMENTS: Indicates path to the document’s attachment.

How to get Document Properties ?

To get the document properties, you need to select the document you want from the collection and then click on Properties icon on Document blade and you can get all the properties in Properties blade.

Cognitive-Services_Computer-Vision-API_04

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.