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. Cosmos DB Resource Governor

    We need a way to implement something mimicking SQL resource governor on Cosmos DB. We wish to allow our service that pushes dats to cosmosDB and admin users full bandwith of the allocated RU\sec. But we wish to limit our customer queries to an RU/sec ceiling. Have we any offering of this type yet?

    4 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 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…

    125 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 →
  3. Extend Bulk Executor to cover Cosmos Db Table Api

    Bulk Executor api is very powerful but does only support Document db. We would ideally want to use Table api because Document db api does not support OData. But we also work with a high throughput in a big data pipeline where we use Bulk Ingestor api to do the data ingestion which does not work in Table api. It would be nice to have same bulk ingestion functionality for Table api

    1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Table API  ·  Flag idea as inappropriate…  ·  Admin →
  4. 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 →
  5. CosmosDB Cassandra API should support materialized views

    Hi,

    we are currently using Materialized Views with Cassandra, and we would like this feature to be available with Cosmos DB.

    Thanks

    15 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Cassandra API  ·  Flag idea as inappropriate…  ·  Admin →
  6. Allow us to define global unique keys across all partitions

    Unique keys are scoped to partitions, but this makes it challenging to store data that's supposed to be globally unique like email address or mobile number. I ended up creating a traditional SQL Server table for this, but I'd like to migrate it to Cosmos DB.

    12 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 →
  7. 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…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  8. Add geospatial aggregate functions like ConvexHullAggregate

    Looking for a way to compute the bounding box of some features based on a query. For example SQL has https://docs.microsoft.com/en-us/sql/t-sql/spatial-geography/convexhullaggregate-geography-data-type?view=sql-server-2017

    Of course I can download all the documents and compute this, but I think it would be more efficient to let Cosmos DB perform the calculation on the server.

    1 vote
    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 →
  9. Add support for sack

    Currently GraphAPI has almost no support for doing operations while traversing or listing vertices, like combining vertex properties with weights (edge property) as you traverse. Math is not supported, and often times an alternative would be to use a sack, but that is also not supported. So there is really no workaround.

    12 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 →
  10. 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…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  11. Support Table API queries from PowerBI

    Currently, I can't query Table Storage in Azure Cosmos DB from Power BI. I have a lot of useful data stored there but I can't report on it.

    5 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Table API  ·  Flag idea as inappropriate…  ·  Admin →
  12. Gremlin Graph: Add support for array values in group() and groupCount()

    You should be able to group by an array of values. it is perfectly valid to do a group() or groupCount() like so:

    g.V().groupCount().by(values('id','name').fold())

    Other Graphs implementing Gremlin will give you a result, while CosmosDB fails with:

    "Unexpected Error: Cannot resolve object to a primitive value."

    13 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Gremlin API  ·  Flag idea as inappropriate…  ·  Admin →
  13. Graph Gremlin query supports GeoJSON

    Does Cosmos DB supports GeoJSON for Graph Gremlin query?

    1 vote
    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 →
  14. Support distinct

    I tried to make the build-failure-analyzer plugin for jenkins work with Cosmos DB, but unfortunately it fails trying to use distinct command (https://docs.mongodb.com/manual/reference/command/distinct/#dbcmd.distinct)

    Would it be possible to support this? I see the SQL api got distinct support

    Example failure:
    globaldb:PRIMARY> db.failureCauses.distinct('categories')
    2018-10-25T07:53:50.504+0100 E QUERY [js] Error: distinct failed: {
    "_t" : "OKMongoResponse",
    "ok" : 0,
    "code" : 115,
    "errmsg" : "Command is not supported",
    "$err" : "Command is not supported"
    } :
    _getErrorWithCode@src/mongo/shell/utils.js:25:13
    DBCollection.prototype.distinct@src/mongo/shell/collection.js:1553:1
    @(shell):1:1

    5 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  15. Support View objects similar to MongoDB

    Create the capability to create views similar to MongoDB database. Views are very useful when is required to do aggregation operations, lookups in different tables as well.

    2 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  16. 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
    (thinking…)
    Sign in with: oidc
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  MongoDB API  ·  Flag idea as inappropriate…  ·  Admin →
  17. Filter by NULL

    Be able to return values from Table Storage where a records have a NULL, in a column.

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

  19. Enable Locks at Database and Collection Level as well to avoid deletion.

    We can enable locks at Resource level to make sure Cosmos DB is not deleted. Currently it will still allow the admin to delete the Database and delete the collection under the db. It will be nice to lock the DB and Collection as well. So in Production Environment we can enable these locks to make sure they are not deleted by anyone.

    5 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 →
  20. 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.

    18 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