Azure Cosmos DB

Azure Cosmos DB is a globally distributed database service designed to enable you to elastically and independently scale throughput and storage across any number of geographical regions with comprehensive SLAs. You can develop document, key/value, or graph databases with Cosmos DB using a series of popular APIs and programming models.

SQL API:
With the SQL API, Azure Cosmos DB provides rich and familiar SQL query capabilities with consistent low latencies over schema-less JSON data. In this article, we provide an overview of the Azure Cosmos DB’s SQL API, and how to best use the API.

Gremlin API:
Azure Cosmos DB provides the Gremlin API for graph modeling and traversal, along with turn-key global distribution, elastic scaling of storage and throughput, and low latency.

Cassandra API
Azure Cosmos DB supports the Cassandra API. This means that by using existing drivers, your application written for Cassandra can now communicate with Azure Cosmos DB instead of Apache Cassandra/Datastax Enterprise databases, and gain benefits like global distribution and elastic scale.

MongoDB API:
Azure Cosmos DB supports the MongoDB API. This means that by using existing drivers, your application written for MongoDB can now communicate with Cosmos DB instead of MongoDB databases, and gain benefits like global distribution & elastic scale.

Table API:
Azure Cosmos DB provides the Table API for key-value workloads. This provides a premium experience for Azure Table storage with secondary indexes, global distribution, low latency, and dedicated throughput.

How can we improve Azure Cosmos DB?

You've used all your votes and won't be able to post a new idea, but you can still search and comment on existing ideas.

There are two ways to get more votes:

  • When an admin closes an idea you've voted on, you'll get your votes back from that idea.
  • You can remove your votes from an open idea you support.
  • To see ideas you have already voted on, select the "My feedback" filter and select "My open ideas".
(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can support and comment on it.

If it doesn't exist, you can post your idea so others can support it.

Enter your idea and we'll search to see if someone has already suggested it.

  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. Transactions that across a collection

    I want a transaction of the document that has been saved in multiple collections.
    Such as global transaction.
    It does not matter even if there is a limit to the consistency of this model.

    49 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Flag idea as inappropriate…  ·  Admin →
  2. Support for Graph API in Data Migration tool

    Looking for a way to do backup/restore or manual export/import of a Cosmos DB graph using Graph API - or equivalent.
    I want to be able to restore state of a database while developing and found that Data Migration tool can do what I want, but does not support Graph API.

    48 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Gremlin API  ·  Flag idea as inappropriate…  ·  Admin →
  3. Compress stored data

    Please compress data in place for more efficient use of storage.

    For example, I recently exported the entire dataset from a collection and gathered the following stats:

    DocumentDB Data Storage: 627 MiB (including hidden fields and other overhead I assume, but not Indexes)
    Exported JSON: 461.72 MiB
    Compressed JSON: 47MiB

    So potentially a 10x saving in data storage size.

    47 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    4 comments  ·  Flag idea as inappropriate…  ·  Admin →
  4. Microsoft join and support GQL

    I think it would be a great benefit for Cosmos DB to support the new movement to get to a single Graph Query Language. Microsoft joining this movement might help in rapid evolution and acceptance of such a language.

    Taken from https://neo4j.com/blog/time-for-single-property-graph-query-language/:

    The time has come to create a single, unified property graph query language.

    Different languages for different products help no one. We’ve heard from the graph community that a common query language would be powerful: more developers with transferable expertise; portable queries; solutions that leverage multiple graph options; and less vendor lock-in.

    One language, one skill set.

    47 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Gremlin API  ·  Flag idea as inappropriate…  ·  Admin →
  5. JDBC Support

    Provide a JDBC adapter to allow for multiple out of the box data solutions to connect to DocumentDB, ex TIBCO Business Works, SAS Reporting/BI, and Tableau.

    This would really open up use case possibilities.

    46 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    4 comments  ·  Flag idea as inappropriate…  ·  Admin →
  6. stored procedures & functions in .NET (C#)

    Would be great to have the option to implement stored procedures, functions and triggers in .NET (C#) as well.

    46 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  7. Configure RU per region

    For a database/collection that is made available in several regions, make it possible to provision RU capacity independently in each region. Use case: Secondary backup region that exists only as an up-to-date mirror of data in case the primary becomes unavailable, not to offload read operations under normal operation. Currently this means provisioning unused RU capacity, at a high cost, in the secondary region.

    46 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Other  ·  Flag idea as inappropriate…  ·  Admin →

    Hi Magnus. This is currently unplanned by us for our road map. Some context and feedback for you on this.

    First, to do the replication itself to the secondary region you need RU/s sufficient to support the request rates for the primary region itself. Replication and writing to the secondary region itself is not free so there needs to be sufficient throughput provisioned to do that.

    Second, for the secondary region to be able to function as the primary should a fail over occur, the replica region itself needs sufficient throughput to function as the primary.

    Thanks again for your suggestion. Will mark as unplanned for now in case circumstances ever do change.

  8. First Class Support for Create/Update Differentiation w/i ChangeFeed

    Add a mechanism to determine the type of change feed event being processed. Actions (e.g. Create/Update/Delete) should be accessible via the FeedResponse<T> (for the .net SDK) for each document.

    In addition, CreateDocumentChangeFeedQuery should allow for filtering by these new action types (w/i the DB). Perhaps other [document-level] criteria should be supported too.

    45 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    6 comments  ·  Flag idea as inappropriate…  ·  Admin →
  9. Azure Cosmos DB doesn't support basic sort

    Mongo supports case insensitive sort through collation usage.
    When I tested on mongo locally it worked, when deployed on azure platform it just started throwing error:
    "MongoError: server bmcldocdb.documents.azure.com:10255 does not support collation"

    43 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  10. Support $geonear query in Azure Cosmos DB Mongo API

    I want to transition my application to use Azure Cosmos DB. It is currently using MongoDB with the latest Mongo C# Driver.

    Most of the functionality is working with just updating the connection string to point to the Azure Cosmos DB.

    However some of the major functionality in my application makes use of MongoDB geonear functionality with code as below:

    public IEnumerable<Tuple<Location, double>> GeoNear(StagedLocation stagedLocation, int matchRadius)
    {
    var geoPoint = new BsonDocument
    {
    {"type","Point"},
    {"coordinates",new BsonArray(new []{ stagedLocation.Address.Longitude.Value, stagedLocation.Address.Latitude.Value })}
    };

    var geoNearOptions = new BsonDocument
    {
    {"near", geoPoint},
    {"spherical", true },
    {"limit", 20},
    {"distanceField", "Distance"},
    {"maxDistance", Convert.ToDouble(matchRadius)},
    };

    42 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  11. Cosmos DB connector for Power BI is still in beta, Please make a stable version

    Cosmos DB connector for Power BI is still in beat and our customer are unwilling to accept this. Can we make a stable version of it?

    41 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    5 comments  ·  Flag idea as inappropriate…  ·  Admin →
  12. Support stored procedure execution over all partitions

    So I'm in a bit of a corner performance wise. Querying data from a broad and not necessarily well defined range of devices - some update once a day, some every 10 seconds. Need to query over the longer time span to make sure all devices are represented but only need the latest record. So might need a 100 or so results at the end but due to the lack of a GROUP BY function in Cosmos SQL, the output can be more like 100,000 which then have to be filtered out client side. No worries, just use a stored…

    40 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    4 comments  ·  Flag idea as inappropriate…  ·  Admin →
  13. Support $GraphLookup

    $graphLookup is not implemented in Mongo API
    If you try to do this with Mongo API (or Cosmos DB) + Gremlin you need to know what the relationships are upfront. Need DYNAMIC joins 
    which MongoDB supports today.

    38 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  14. Implement a GraphQL Provider (repost)

    (Previous post with the same title was closed without giving the correct solution.)

    graphql {http://graphql.org/} is becoming increasingly adopted by front end frameworks (including mobile) for querying backend / API data.

    Rather than having to translate each graphql query into a DocumentDB client call it would be optimal and very powerful to issue the query directly.

    It would also provide enhanced query abilities over the existing REST approach.

    38 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  15. Encryption via Key Vault

    Provide ability to encrypt data at rest using provided keys using Key Vault. This is a frequent requirement for storing anything related to the business, especially finances.

    Keys will be managed by customer in that case.

    35 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  16. add spatial support to Graph API

    Enable the same support for spatial queries that exists for DocumentDb for graph elements. Similar to Neo4j Spatial.

    34 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Gremlin API  ·  Flag idea as inappropriate…  ·  Admin →
  17. Support Querying a Subset of Logical Partitions in a Partitioned Collection

    With the 10GB limit for a logical partition, there is a possibility where a partition key cannot be broken down far enough to avoid the upper limit without implementing a partitioning scheme similar to:

    Partition Keys:
    {Tenant Id}{Document Type}{Partition 1}
    {Tenant Id}{Document Type}{Partition 2}
    {Tenant Id}{Document Type}{Partition 3}
    .
    .
    .
    {Tenant Id}{Document Type}{Partition N}

    Where N is a defined as the total # of partitions per tenant id / document type combination to have. This is just an example where a single collection contains data from multiple tenants and document types, but could apply to other scenarios as well.

    34 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  18. Use Json.Net contract resolver when using Linq to generate SQL queries

    Member names in SQL queries generated from Linq currently look at the member for either a JsonPropertyAttribute or DataMemberAttribute. If the ability to specify custom JsonSerializerSettings is implemented (see http://feedback.azure.com/forums/263030-documentdb/suggestions/6422364-allow-me-to-set-jsonserializersettings ), this will need to be implemented to actually remove the need to annotate every member of your data object classes.

    34 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  19. PHP SDK For DocumentDB

    Microsoft Have been done so many great things ,but all these are not perfact . But i've seen the change of microsoft, and hope more change.

    PHP is so popular for web developing ,plz support it.

    34 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    4 comments  ·  Flag idea as inappropriate…  ·  Admin →
  20. Better documentation on integration with Logic Apps (or bugfix?) - We have serious difficulties with an error on "PartitionKey"

    We are trying to do serverless with logic apps and have connected the Logic App to an Event Grid Topic. Our intent is to store events in Document DB, but we are unable to get it to work because of errors regarding the Partition Key. We have tried all possible strings in the partition key field and created a number for collections with different partion keys. We don't know what black magic spells we need to use and cannot really find good documentation with examples of such operations on the docs for either Cosmos DB or Logic Apps.:

    One of…

    33 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Other  ·  Flag idea as inappropriate…  ·  Admin →
  • Don't see your idea?

Azure Cosmos DB

Feedback and Knowledge Base