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. Manage Azure DocumentDB using PowerShell

    We need a PowerShell module for managing Azure DocumentDB

    1,106 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 →
    • Implement LIKE keyword

      Add support for the LIKE '%%' SQL keyword and associated functionality.

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

        Azure Cosmos DB supports the CONTAINS, STARTSWITH, and ENDSWITH built-in functions which are equivalent to LIKE.

        We are planning to add support for LIKE since this is a top requested item, but meanwhile, please use the other equivalent keywords.

      • [CosmosDB] Be able to manage Backup and Restore with Portal and APIs

        Please provide the ability to manage backup and restore on our own.

        Restore through support is not clear and inconvenient.

        It turned out restore is only available through paid support plan.

        This document https://docs.microsoft.com/en-us/azure/cosmos-db/online-backup-and-restore#restoring-a-database-from-an-online-backup does not say it in any word.

        The situation made our customer extremely unhappy.

        252 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 →
        • Add DateTimeOffset support

          The DocumentDb engine should be able to recognize and properly order DateTimeOffset serialized fields.

          86 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 →
          • Execute a procedure when TTL expires

            I would like to execute a procedure when TTL expires. For example, when TTL expires I would like to also delete some related records from Azure table storage.

            68 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 →

              We plan to introduce support for tracking deletes in the change feed. Using this capability, you can integrate with Azure Functions or another event processing system to perform operations like execute procedure or call other services programmatically.

            • Support for document validation, using JSON Schema

              Similar to MongoDB v3.6 https://docs.mongodb.com/manual/reference/operator/query/jsonSchema/ Would be useful for both MongoDB API and DocumentDB API

              50 votes
              Vote
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
                Password icon
                Signed in as (Sign out)
                You have left! (?) (thinking…)
                1 comment  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
              • Compress query results

                Compress query results if requested by the client. This could significantly improve network throughput for large queries.

                49 votes
                Vote
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                  Password icon
                  Signed in as (Sign out)
                  You have left! (?) (thinking…)
                  0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                • 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
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                    Password icon
                    Signed in as (Sign out)
                    You have left! (?) (thinking…)
                    1 comment  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
                  • 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.

                    31 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 →
                    • CosmosDB, Mongo API, Delete Many with Partition Key configured

                      We have an IoT based solution and archive old data to blob storage. Our data is moved to archive using the shard key. Removing the data once archived is a pain and slow as each individual document has to be deleted rather than using DeleteMany(x=>x.shardId == id).

                      More info found at:
                      https://stackoverflow.com/questions/51301711/cosmosdb-mongo-api-delete-many-with-partition-key-configured

                      25 votes
                      Vote
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                        Password icon
                        Signed in as (Sign out)
                        You have left! (?) (thinking…)
                        0 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
                      • Please don't surprise your customers with Azure Cosmos DB costs...

                        1. RU/s are confusing, new and different. Please assume that your current and potential customers are not going to understand how they work for a while.
                        2. Notify your customers via portal alerts when their costs are on track to increase by more than 50% on the next invoice.
                        3. Every service needs a trial mode. There needs to be a very cheap and limited way that current and potential customers can test drive Azure services without being surprised by thousands of dollars in charges.
                        4. Don’t default to 800 RU/s when creating an Azure Cosmos DB Table with the…

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

                          Hi Robin, thank you for your feedback. Will take one at a time.

                          1. We realize RU/s (provisioned throughput) is a different model than people may be used to. It is however, not different than say provisioning a VM where you are paying for compute, IO and memory. Customers here too do not want to over-provision as there are unused resources. The same goes for Cosmos DB. Where we need to do better, is in helping people measure their usage and tune their RU/s. This work is planned and ongoing.

                          2. We are currently planning on enhancements to Azure Advisor in the portal around this.

                          3. Cosmos DB has three different means for Trial. There is the Azure Trial itself. There is also our Emulator (https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator). Finally, there is TryCosmosDB, (https://azure.microsoft.com/en-us/try/cosmosdb/)

                          4. I will review this with our SDK team. Agree we should use minimums as…

                        • partialFilterExpression should be supported

                          According to MongoDB documentation, partialFilterExpression is supported since version 3.2: https://docs.mongodb.com/manual/reference/method/db.collection.createIndex/

                          When querying Azure Cosmos DB server version I receive "3.2.0" so I am expecting partialFilterExpression to be supported.

                          Unfortunately I receive: 'partialFilterExpression' is not supported when trying to create an index using partialFilterExpression.

                          I have several remarks here:

                          1) Can you provide an exhaustive documentation on features that are implemented and those that are not?
                          2) Can you please advertise that you do not support MongoDB API entirely?
                          3) Is there a way to track current backlog and status of Mongo DB API implementation at Microsoft? Transparency is the…

                          13 votes
                          Vote
                          Sign in
                          Check!
                          (thinking…)
                          Reset
                          or sign in with
                            Password icon
                            Signed in as (Sign out)
                            You have left! (?) (thinking…)
                            1 comment  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
                          • CosmosDB Cassandra API should support lightweight transactions in CQL

                            Currently, lightweight transactions are not supported by the CosmosDB Cassandra API, but should be.

                            12 votes
                            Vote
                            Sign in
                            Check!
                            (thinking…)
                            Reset
                            or sign in with
                              Password icon
                              Signed in as (Sign out)
                              You have left! (?) (thinking…)
                              0 comments  ·  Cassandra API  ·  Flag idea as inappropriate…  ·  Admin →
                            • 12 votes
                              Vote
                              Sign in
                              Check!
                              (thinking…)
                              Reset
                              or sign in with
                                Password icon
                                Signed in as (Sign out)
                                You have left! (?) (thinking…)
                                0 comments  ·  Table API  ·  Flag idea as inappropriate…  ·  Admin →
                              • Improve range() step costs

                                Graph API is nice, however in its current state it is unusable for large data sets due to high RU costs.
                                We are trying to implement paging for retrieving large amounts of data, however RU cost is unacceptable. Query "g.V().range(0,100)" costs 63.11 RU, however "g.V().range(2000,2100)" costs 338.06 RU even though it is same amount of data. Higher values are even more expensive meaning it's impossible to retrieve high amount of data without scaling up throughput.

                                10 votes
                                Vote
                                Sign in
                                Check!
                                (thinking…)
                                Reset
                                or sign in with
                                  Password icon
                                  Signed in as (Sign out)
                                  You have left! (?) (thinking…)
                                  0 comments  ·  Gremlin API  ·  Flag idea as inappropriate…  ·  Admin →
                                • Different Access Levels for Cosmos DB

                                  Allow a set of keys for read-write or read-only that are restricted to the Collection level or the DB level. Enable multiple applications to have different levels of permission to a single Cosmos DB.

                                  8 votes
                                  Vote
                                  Sign in
                                  Check!
                                  (thinking…)
                                  Reset
                                  or sign in with
                                    Password icon
                                    Signed in as (Sign out)
                                    You have left! (?) (thinking…)
                                    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                                  • Document how to make & use Icon Sets in the Graph Data Explorer

                                    You have a Gremlin Graph Intro video that includes use an icon set (the video shows an icon set for Marvel characters) - but there is very little info on how you can create this icon set - i.e. the video shows a vertice that represents the icon set, but it isn't clear what properties on the vertice do what - and also what encoding is used for the icon picture content.

                                    8 votes
                                    Vote
                                    Sign in
                                    Check!
                                    (thinking…)
                                    Reset
                                    or sign in with
                                      Password icon
                                      Signed in as (Sign out)
                                      You have left! (?) (thinking…)
                                      0 comments  ·  Gremlin API  ·  Flag idea as inappropriate…  ·  Admin →
                                    • More fine-grained permissions

                                      I'd love to see more fine-grained permissions. In particular, an 'Edit' permission would be extremely helpful. The user with an Edit permission would be able to change any of the data for the resource except the ID, and would not be able to delete the document.

                                      Use case: Provide users with direct but limited access to the DocumentDB database, rather than having to route all their requests through my own API.

                                      3 votes
                                      Vote
                                      Sign in
                                      Check!
                                      (thinking…)
                                      Reset
                                      or sign in with
                                        Password icon
                                        Signed in as (Sign out)
                                        You have left! (?) (thinking…)
                                        0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                                      • Manage parallel processing server side

                                        If I run a query like "SELECT * FROM d WHERE d.field = "x" against a parallel database I expect the DBMS to run that query against each partition at the same time and return a set of collated results. As apparent from the REST API, it appears that such a query is only executed against 1 partition at a time. This means that to get proper parallel processing the client has to work out the partitioning, fire multiple queries and do the collation client side. To some extent this appears to have been encapsulated in the SDKs.

                                        To me,…

                                        1 vote
                                        Vote
                                        Sign in
                                        Check!
                                        (thinking…)
                                        Reset
                                        or sign in with
                                          Password icon
                                          Signed in as (Sign out)
                                          You have left! (?) (thinking…)
                                          0 comments  ·  Flag idea as inappropriate…  ·  Admin →

                                          One of the goals for parallel query execution in the client-side was to support low latency query execution. We’ve since added support for parallelism in the SDKs.

                                          We are planning to add support for REST API of all queries for workloads that need to reduce client CPU utilization.

                                          Thanks,
                                          Aravind Krishna R
                                          PM, Azure Cosmos DB

                                        • fix combined path lenght for unique indexes

                                          Stated in the documentation "combined paths for all unique index properties should not exceed 60 characters"

                                          But when creating the following Index

                                          db.Commits.createIndex(
                                          {
                                          "BucketId" : 1,
                                          "StreamId" : 1,
                                          "StreamRevisionFrom" : 1,
                                          "StreamRevisionTo" : 1,
                                          }, {unique: true})

                                          I take the above to be 49 characters.

                                          The following error is returned

                                          "Make sure that the property names do not contain invalid characters and that the combined paths for all unique index properties do not exceed 60 characters.\"

                                          1 vote
                                          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 →
                                          • Don't see your idea?

                                          Azure Cosmos DB

                                          Feedback and Knowledge Base