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. 32 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  2. Emit RU charges (and other metrics) to Application Insights

    log @cosmosdb RU usage per query in @AppInsights (without using custom data), by configuration.

    turn a key, in configuration, and have request response info, like RU charge, emitted to AppInsights.

    31 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  3. Bug: emulator's Data Explorer stops working if left inactive for 15 minutes

    Steps to reproduce:

    1) Install Cosmos DB
    2) Open Data Explorer in a browser tab
    3) Make a query
    4) Wait for > 15 minutes
    5) Execute another query
    Expected: it works
    Actual result: the following error pops up:

    {"code":403,"body":"{\"code\":\"Forbidden\",\"message\":\"The authorization token is not valid at the current time. Please create another token and retry (token start time: Mon, 09 Jul 2018 08:22:30 GMT, token expiry time: Mon, 09 Jul 2018 08:37:30 GMT, current server time: Mon, 09 Jul 2018 08:46:19 GMT).\\r\\nActivityId: 1bb68cc4-6bae-4e94-83ab-445da191c8e2, Microsoft.Azure.Documents.Common/1.22.0.0\"}","activityId":"1bb68cc4-6bae-4e94-83ab-445da191c8e2"}

    This is extremely annoying, as a multiple times a day I have to open a new…

    31 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    5 comments  ·  Other  ·  Flag idea as inappropriate…  ·  Admin →

    This was a bug we saw reported back in November. We released a fix for this issue back in late December.

    Can one of you reporting here confirm whether this is still an issue? If so, can you email us at askcosmosdb at microsoft dot com. We want to gather more information so we can identify and fix if this is a separate issue from the one above.

    Thanks.

  4. Support archive data post-TTL

    Azure portal should provide an additional feature to archive data post TTL, to a blob or other storage spaces or docdb itself so that expired data wouldn't incur any additional processing cost in RU's while querying and user will still have data backup

    31 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Flag idea as inappropriate…  ·  Admin →

    This is a good suggestion. We are exploring how we can support automatic data-tiering based on TTL. Please email us at askcosmosdb@microsoft in case you would like to explore how to build an archival solution.

    Thanks,
    Aravind Krishna R
    PM, Azure Cosmos DB

  5. Support case insensitive indexing

    Order by returns lowercase characters before uppercase characters.

    x
    y
    z
    A
    B
    C

    I know you can work around this by storing an all lower or all upper case version of the string you want to query by on your object but over time and scale that does add to your RU usage

    30 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    3 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  6. Improve scaling down experience: remove redundant physical partitions

    During initial import we increased RU to 200K. Cosmos Db SQL API created 20 physical partitions with 10K throughput each.
    During regular day we just need 30K Ru. That would mean each physical partition would have only 1,5K RU allocated and a lot of redundant partitions with possible expensive cross-partition calls (total data size is less than 30GB)

    Is there way to decrease amount of physical partitions to reasonable value?
    In a nutshell it is not fair pricing, when you are limited to 1,5K RU and a lot of cross-partition calls you have to pay extra

    30 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    3 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  7. CosmosDB Cassandra API should support lightweight transactions in CQL

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

    29 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Cassandra API  ·  Flag idea as inappropriate…  ·  Admin →
  8. Provide Django integration example

    Provide an example of utilizing DocumentDB with Django. Even better would be showing the replacement of the default sqlite db in Django with DocumentDB.

    29 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  9. Support Pandas DataFrame

    Support saving pandas data frames directly to Tables.

    28 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Table API  ·  Flag idea as inappropriate…  ·  Admin →
  10. 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…

    28 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    5 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…

  11. Execute read-only stored procedures on secondary replica

    I have a many-to-many scenario close to the post below:
    https://feedback.azure.com/forums/263030-documentdb/suggestions/6611247-support-cross-document-joins
    I have multiple entities, and the relationships between them are saved as documents and can't be denormalized.
    Instead of doing multiple queries against the DB, I'd like to wrap it in a stored procedure to save round-trip time.
    However, current stored procedures can only execute on primary replica, so it would be slow if the users are from another region.
    Is that possible to define some read-only stored procedures so that it can be executed in read regions?

    27 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  12. Emulator - Provide some RU/s or RU/m metrics

    It would be nice if the emulator displayed some basic metrics such as RU/s or RU/m even if they were exported to a log file. This would allow us to do some "real world" analysis for better capacity planning.

    26 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  13. 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"

    25 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  14. Add support for latest $lookup step in aggregation pipeline

    In v3.6 of Mongo, the $lookup step of an aggregation pipeline added the ability to join on conditions instead of just an exact match. This is thoroughly documented in the official documentation.

    https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/index.html#join-conditions-and-uncorrelated-sub-queries

    When I attempt to use the step in CosmosDB, I receive the error "Unrecognized parameter to $lookup: let" which indicates that the latest API is not yet supported.

    24 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  15. Support TTL indexes on any field

    Please add support for TTL indexes on any field, not just the internal and inaccessible `_ts` field. We need document specific TTLs.

    https://docs.mongodb.com/manual/tutorial/expire-data/

    24 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →

    Per document TTL is now available in Preview for customers to try.

    To enable and test this feature access your MongoDB API account for Cosmos DB in the Azure Portal, click Preview tab on left hand side, then click Enable to test Per-document TTL.

    You will can also enable and try Aggregation Pipeline and MongoDB 3.4 support from here as well.

    Please try TTL and all these features and please feel free to give us feedback.

    Thank you for your suggestion and your votes.

  16. Filtered unique indexes

    I need my unique indexes to work when a soft delete flag is set to zero so that only the active records will participate in the uniqueness constraint per partition. This also makes it easier to determine deleted records in the Change Feed.

    23 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  17. Make debugging expirience easier and exception messages valuable

    Now error message for queries frequently useless
    "{"code":500,"body":"{\"message\":\"An error occurred while sending the request.\"}"}"

    And I have no ideas what exception happened and what I did wrong.

    Please- add more valuable error messages

    21 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  18. Move RU throughput allocation from Collections to Database Level and viceversa

    We have multiple databases with many collections and would like to move the throughput allocation from single collections to Database level without recreating it and migrating everything.

    21 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Flag idea as inappropriate…  ·  Admin →
  19. Text search in documentdb with accented characters

    I've searched for an answer to this and can't find it...
    What I need is support for something like a text-analyzer that allows similar accented characters (e.g. àáâãäå) to match their normal latin equivalent.
    So searching for names like "Jose" will return results like "José"

    20 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  20. 19 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  • Don't see your idea?

Azure Cosmos DB

Feedback and Knowledge Base