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. [DocumentDB] Allow Paging (skip/take)

    Allowing paging would be huge. Btw, Thank You for rolling out this feature at all! It looks wonderful! Can't wait to try it! However, I won't be able to use it for actual work projects until it supports paging and sorting.

    3,632 votes
    Vote
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
      Password icon
      Signed in as (Sign out)
      You have left! (?) (thinking…)
      108 comments  ·  Flag idea as inappropriate…  ·  Admin →
    • Be able to do partial updates on document

      Allow to push only values for some fields of a document and not need to read the whole document and save it to documentDB.

      3,296 votes
      Vote
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
        Password icon
        Signed in as (Sign out)
        You have left! (?) (thinking…)
        66 comments  ·  Flag idea as inappropriate…  ·  Admin →
      • Add Group By support for Aggregate Functions

        We're really happy about the new aggregate functions that recently were announced. But without Group By support they fall short and will leave many disappointed. Please add Group By support as well.

        2,358 votes
        Vote
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
          Password icon
          Signed in as (Sign out)
          You have left! (?) (thinking…)
          54 comments  ·  Flag idea as inappropriate…  ·  Admin →
        • Add DocumentDB Emulator support for Mac OS X and *nix

          The DocumentDB Emulator currently only supports Windows 10.

          It would be great if support for Mac OS X could be added or documentation to run it on other platforms.

          1,212 votes
          Vote
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
            Password icon
            Signed in as (Sign out)
            You have left! (?) (thinking…)
            41 comments  ·  Flag idea as inappropriate…  ·  Admin →
          • Autoscale Throughput (UR/s)

            Depending on the average amount of incomming requests/ required RU's, (or other parameters,)
            I would like to autoscale the througput(RU/s) of a collection.

            1,141 votes
            Vote
            Sign in
            Check!
            (thinking…)
            Reset
            or sign in with
              Password icon
              Signed in as (Sign out)
              You have left! (?) (thinking…)
              45 comments  ·  Flag idea as inappropriate…  ·  Admin →
            • 651 votes
              Vote
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
                Password icon
                Signed in as (Sign out)
                You have left! (?) (thinking…)
                26 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
              • Allow multi Order By

                From what I see it is impossible to run a query with more than one column in the Order By.

                583 votes
                Vote
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                  Password icon
                  Signed in as (Sign out)
                  You have left! (?) (thinking…)
                  14 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
                • Support Gremlin Bytecode to enable the fluent API of Gremlin.NET

                  Azure Cosmos DB Graph API doesn't support Gremlin Bytecode. Therefor it is not possible to use the fluent traversal API of Gremlin.NET.

                  Within the Azure Cosmos DB Graph .NET API (https://docs.microsoft.com/en-us/azure/cosmos-db/graph-sdk-dotnet) it is recommended to use Gremlin.NET. So it would be really nice if all features of Gremlin.NET would be supported.

                  See also the idea of a "better type-safe APIs fro Gremlin" (https://feedback.azure.com/forums/263030-azure-cosmos-db/suggestions/19340761-better-type-safe-apis-for-gremlin) within the Graph API feedback.

                  524 votes
                  Vote
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                    Password icon
                    Signed in as (Sign out)
                    You have left! (?) (thinking…)
                    22 comments  ·  Gremlin API  ·  Flag idea as inappropriate…  ·  Admin →
                  • OpenSource DocumentDB .NET SDK

                    Unlike this thread
                    https://feedback.azure.com/forums/263030-documentdb/suggestions/6334154-open-source-documentdb

                    We would like to have only the .NET SDK as opensource
                    https://github.com/Azure/azure-documentdb-dotnet/issues/128

                    I have been programming against docdb with .Net for more than one year now and 80% of my problems come from the .NET SDK. We must be able to step into source code easily and propose pull requests to fix bugs. This will help Microsoft DocDB dev team to speed up corrections and features on this SDK.

                    306 votes
                    Vote
                    Sign in
                    Check!
                    (thinking…)
                    Reset
                    or sign in with
                      Password icon
                      Signed in as (Sign out)
                      You have left! (?) (thinking…)
                      2 comments  ·  Flag idea as inappropriate…  ·  Admin →
                    • Support ORDER BY on the ST_DISTANCE spatial function

                      Ordering results by the ST_DISTANCE spatial function is currently not supported.

                      293 votes
                      Vote
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                        Password icon
                        Signed in as (Sign out)
                        You have left! (?) (thinking…)
                        13 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
                      • Cosmos DB BulkExecutor for .NET Core

                        I would like Azure Cosmos DB BulkExecutor library for .NET Core compatible version.

                        Recent application often uses Microsoft.Azure.DocumentDB.Core package, so the need for the .NET Core version is high.

                        294 votes
                        Vote
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                          Password icon
                          Signed in as (Sign out)
                          You have left! (?) (thinking…)
                          7 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
                        • connection string

                          Support for DotNet library constructor of DocumentClient taking "Connection string", not the "Uri endpoint + string authKey"similar to other implementations of DocumentDB, or similar to Azure.Storage

                          262 votes
                          Vote
                          Sign in
                          Check!
                          (thinking…)
                          Reset
                          or sign in with
                            Password icon
                            Signed in as (Sign out)
                            You have left! (?) (thinking…)
                            5 comments  ·  Flag idea as inappropriate…  ·  Admin →
                          • Integrate with Azure Active Directory

                            Really need to be able to set resource level access control integrated with Azure Active Directory. The current built-in user / resource access control is a pain to use and we end up with just using the master key and giving everyone access to everything.

                            Azure SQL DB already has this, and is a pleasure to work with.

                            Perhaps you should take a leaf from your sister team on this -

                            https://docs.microsoft.com/en-us/azure/sql-database/sql-database-control-access-aad-authentication-get-started

                            193 votes
                            Vote
                            Sign in
                            Check!
                            (thinking…)
                            Reset
                            or sign in with
                              Password icon
                              Signed in as (Sign out)
                              You have left! (?) (thinking…)
                              5 comments  ·  Flag idea as inappropriate…  ·  Admin →
                            • Support Gremlin APIs on Cosmos DB Emulator

                              The Cosmos DB Emulator currently does not support the Gremlin API. So at the moment it is not possible to test against the emulator using the Gremlin Console (http://tinkerpop.apache.org/docs/3.2.5/tutorials/the-gremlin-console/)

                              174 votes
                              Vote
                              Sign in
                              Check!
                              (thinking…)
                              Reset
                              or sign in with
                                Password icon
                                Signed in as (Sign out)
                                You have left! (?) (thinking…)
                                8 comments  ·  Gremlin API  ·  Flag idea as inappropriate…  ·  Admin →
                              • Support LINQ ANY or WHERE for child object collections

                                Example trying to query Sales

                                var querySales = DocumentDb.Client.CreateDocumentQuery<Sale>(collectionLink)
                                .Where(q => q.Type == "Sale" && q.Stage <= 99 && q.InvolvedParties.Any(qq => qq.Id == userId))

                                Buy ANY not supported

                                Also tried
                                .Where(q => q.Type == "Sale" && q.Stage <= 99 && q.InvolvedParties.Where(qq => qq.Id == advisorUserId).Count() > 0)

                                get WHERE not supported

                                Really want the DB to perform the search as a lot of results will come back.

                                sample data:
                                {
                                "id": "af10eebf-b0b6-49d5-8db5-96f54c4985d2",
                                "Type": "Sale",
                                "GroupId": 1,
                                "InvolvedParties": [
                                {
                                "Id": "344595a3-4e73-4bd5-9988-849858f045f1",
                                "PartyType": 0,
                                "Name": "test user"
                                }
                                ],

                                157 votes
                                Vote
                                Sign in
                                Check!
                                (thinking…)
                                Reset
                                or sign in with
                                  Password icon
                                  Signed in as (Sign out)
                                  You have left! (?) (thinking…)
                                  5 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →

                                  We have started work on this feature and plan to release it in an upcoming release. I cannot give an exact date but this should be released soon. Will update here once a date is known or once it is publicly available.

                                  Thank you for your suggestion.

                                • support COUNT of a query on a partitioned collection

                                  db.collection.count() works just find but when attempting to count a filtered down collection db.collection.find({query...}).count() results in an Operation Failure that says 'query in command must target a single shard key' but need to be able to do counts across multiple partitions

                                  125 votes
                                  Vote
                                  Sign in
                                  Check!
                                  (thinking…)
                                  Reset
                                  or sign in with
                                    Password icon
                                    Signed in as (Sign out)
                                    You have left! (?) (thinking…)
                                    18 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
                                  • Make COUNT() aware of indexes

                                    Queries with COUNT() or other aggregates are very expensive and all appear to be scan driven vs. index driven.

                                    I have 50k documents in collection, each has "Type" property with string value. The indexing policy is default.

                                    The following simple query consumes 615 RUs:
                                    SELECT VALUE COUNT(1) FROM x WHERE x.Type ='Content'

                                    The result is 9738 records.

                                    The query metrics are:
                                    RetrievedDocumentCount: 9738
                                    RetrievedDocumentSize: 69506571
                                    OutputDocumentCount: 1
                                    OutputDocumentSize: 53
                                    IndexHitDocumentCount: 0
                                    IndexHitRatio: 0

                                    So what we see is that database reads all "Contents" and than counts them. But it's enough to just count the index entries not to read all…

                                    105 votes
                                    Vote
                                    Sign in
                                    Check!
                                    (thinking…)
                                    Reset
                                    or sign in with
                                      Password icon
                                      Signed in as (Sign out)
                                      You have left! (?) (thinking…)
                                      1 comment  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
                                    • Add provider for Entity Framework 7

                                      Its very important to have ORM (ODM) support for DDD(Domain Driven Design)-style architectures. DDD is what makes DocumentDB most useful IMHO. Since EF7 was refactored to be extensible and support non-relational databases, I think its important to provide DocumentDB support for EF. This also should make migration of existing EF-based applications to DocumentDB much easier and will attract much more developers to this product.

                                      92 votes
                                      Vote
                                      Sign in
                                      Check!
                                      (thinking…)
                                      Reset
                                      or sign in with
                                        Password icon
                                        Signed in as (Sign out)
                                        You have left! (?) (thinking…)
                                        1 comment  ·  Flag idea as inappropriate…  ·  Admin →
                                      • Mongo DB API - cursor.sort() does not return sorted result

                                        When I use find() with sort(), the results are not sorted correctly. The order of the returned items do change, but in a strange order. (MongoDB returns correctly sorted result with the same query). Is this a CosmosDB bug?

                                        Here are the queries and results. The queries are executed with a Mongo DB shell connected to a Cosmos DB instance. You can see that the header_timestamp order are incorrect.

                                        > db.datastore.find({}, {_id: 1, header_timestamp: 1})

                                        { "_id" : "object-bbfg0pritvunrk0bi170", "header_timestamp" : NumberLong(1) }
                                        { "_id" : "object-bbfg0rjitvunrk0bi180", "header_timestamp" : NumberLong(3) }
                                        { "_id" : "object-bbfg0s3itvunrk0bi18g", "header_timestamp" : NumberLong(4) }
                                        {…

                                        85 votes
                                        Vote
                                        Sign in
                                        Check!
                                        (thinking…)
                                        Reset
                                        or sign in with
                                          Password icon
                                          Signed in as (Sign out)
                                          You have left! (?) (thinking…)
                                          4 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
                                        • Needs documentation about limits when MongoDb API is used

                                          Seems that information about limitations with MongoDb API is missing,
                                          or impossible to find. For example mongo has max doc size 16Mb but
                                          Azure docDb 2Mb, which is correct for CosmosDbWithMongoAPI.
                                          (Even that documentDb limits documentation which is referred in this site seems to be removed)

                                          -Maximum document size ?
                                          -Maximum query payload size ?
                                          -Maximum query result size ?
                                          -Maximum size of partition of partitioned collection ?
                                          -Maximum count of documents in the partition of partitioned collection ?
                                          -Maximum count of documents in single-partition collection ?
                                          -MongoDb needs manual creation of indexes, docDb indexes automatically all properties, how about…

                                          73 votes
                                          Vote
                                          Sign in
                                          Check!
                                          (thinking…)
                                          Reset
                                          or sign in with
                                            Password icon
                                            Signed in as (Sign out)
                                            You have left! (?) (thinking…)
                                            2 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
                                          ← Previous 1 3
                                          • Don't see your idea?

                                          Azure Cosmos DB

                                          Feedback and Knowledge Base