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. 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.

    93 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 →
  2. Make triggers automatic

    Right now, triggers are not automatic meaning that they must be specified on each database operation where you want them to be triggered. This means that there is no way to ensure that business rules and other constraints are maintained. I have resorted to telling other developers never to hit the database directly but instead use the set of sprocs established to maintain constraints. It seems to work for us because we're small, but I can imagine that in a larger development team, someone will hit the database directly bypassing your sprocs and risk violating your desired constraints.

    Triggers provide…

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

    This is not on our roadmap. As you correctly pointed out there are or can be issues making these automatic that could impact performance. Our recommendation is these should be explicit in your app.

    Thank you for your suggestion. We will revisit this again sometime in the future.

  3. 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

    82 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    4 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  4. Support multiple collections in stored procedures

    Currently CosmosDB Stored procedures only allow access to a SINGLE collection (because they seem to be scoped to collections rather than to the database), via getContext() :

    var collection = getContext().getCollection();

    But any "useful" / "real-life" application using ComosDB will typically have to interact with more than one collection. For example, it is currently IMPOSSIBLE to insert documents into two distinct collections within a database using a single stored procedure -- a VERY SERIOUS drawback / limitation.

    I would propose that stored procedures be scoped to the database level and then we would be allowed to do something like:

    var…

    78 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    3 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  5. Add support for "Search text" ($text Operator)

    Support for "Mongo Search Text" (https://docs.mongodb.com/manual/text-search/). Example of use:

    db.stores.find( { $text: { $search: "java coffee shop" } } )

    77 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    4 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  6. 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…

    77 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  7. Increase 10GB limit on non partitioned collection

    Give there is a hard 10GB limit on a non-partitioned collection, and partition collections are much more expensive, with no auto-upgrade and code changes required to migrate to partitions, a larger size limit on non partitioned collection is much needed.

    74 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 →
  8. Deploy Stored Procedures from Source Control

    It would be great if we could deploy sprocs from visualstudio.com as we can with Azure Functions or Azure Web Sites.

    69 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    4 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  9. Order By Null Handling

    Currently if you do an order by on a nullable value, the documents are not returned at all. Please add functionality similiar to Application Insights where you can specify if the documents with the null value appear at the beginning or end of the sort.

    63 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 →
  10. Pin the Graphs from the Metrics Page to Azure Portal Dashboards

    I would love to be able to pin the graphs on the Metrics tab of the Azure Portal blade for Cosmos DB to my Azure Dashboard. Many other services allow this and it's great to get an overview of health, status and usage. Also great for Ops dashboards, sharing, etc.

    Right now the work around is to manually point the diagnostic logs to an OMS workspace and recreate the query in Log Analytics, and then pin it. It kinda sucks and your graphs are way better.

    62 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Other  ·  Flag idea as inappropriate…  ·  Admin →
  11. Unique indexes on Graph vertex/edge properties

    I need to ensure global uniqueness for things like username/email/mobile number/etc. Since we no longer have traditional SQL, this capability is lacking. Allow me to define unique indexes so the write region has only one occurrence of a distinct value.

    Ideally, this should also make FILTERED unique indexes possible.

    61 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    5 comments  ·  Gremlin API  ·  Flag idea as inappropriate…  ·  Admin →
  12. Support OrderBy and OrderByDescending in Nested Arrays

    For example in a document structure such as:

    {
    "id": "some id",
    "things": [
    { "value": "5" },
    { "value": "2" },
    { "value: "7" }
    ]
    }

    It would be great to be able to do something like:

    queryable.Select(x => x.Things.OrderByDescending(y => y.Value)).AsEnumerable.FirstOrDefault();

    60 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    3 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →

    This is something we have on our backlog and eventually plan to implement this but it is not on our short-term plan. Will mark this as under review for now as we will continue to review the comments and votes on this issue as we revisit feedback.

    Thanks for your request.

  13. MongoDB API : aggregation operation is too slow

    the aggregation operation is too slow ...

    57 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    9 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →

    We are currently working on this feature and have made it available in Preview in the Azure Portal.

    Please feel free to test Aggregation Pipeline support for your MongoDB API accounts in Cosmos DB by opening your MongoDB API account, then clicking on “Preview” tab on left hand side and then Enable for Aggregation Pipeline.

    While there please feel free to test support for MongoDB 3.4 support as well as Per-Document TTL support.

    Thank you for your request and votes.

  14. Compress query results

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

    52 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. The ability to reference JavaScript libraries (e.g. underscore) within server-side scripting

    It'd be nice to be able to reference javascript libraries within server-side scripting. Something like an AMD or RequireJS loader.

    For example:
    var _ = require('lodash');

    50 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    4 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  16. 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.

    50 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 →
  17. 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.

    50 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 →
  18. 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
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  19. 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 →
  20. 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 →
  • Don't see your idea?

Azure Cosmos DB

Feedback and Knowledge Base