Azure Cosmos DB

Have feedback for Azure Cosmos DB product? Submit your idea here or upvote other ideas. All feedback is monitored and reviewed by the Azure Cosmos DB team. 

This site is for feature suggestions only. For technical questions or issues, please submit them to StackOverflow,where we and the community can better help you.

Please use the following categories when submitting your idea.

SQL API: Query language features, syntax using SQL API, indexing, any other core features in Azure Cosmos DB.

Gremlin API: Graph features and capabilities using Gremlin API.

Cassandra API: Features and capabilities using Cassandra API.

MongoDB API: Features and capabilities using MongoDB API.

Table API: Features and capabilities using Table API.

Etcd API: Features related to using etcd as a configuration store for Kubernetes.

Built-in Apache Spark: Features related to built-in Apache Spark in Azure Cosmos DB.

Built-in Notebooks: Features related to built-in Notebooks in Azure Cosmos DB.

SDK: Features related to Azure Cosmos DB SDKs for SQL API.

Change Feed: Features related to Change Feed.

Management: All management features, backup/restore,monitoring, ARM, PowerShell and CLI.

Portal: All features for Azure Portal and Cosmos DB Explorer.

Emulator: Features related to the Azure Cosmos Emulator.

Other: Features not related to any other category.

Security:
Authentication, authorization,permissions and encryption features.

Monitoring:
Metrics, monitoring, alerts,and diagnostics features.

Server-side: Stored procedures, Triggers,and User-Defined Functions.

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. Support cross-document joins

    I have a many-to-many scenario that requires something like document-to-document joins.

    In my app, users can "like" posts. That's three "tables" or entity sets. One each for users, likes and posts. I can't put the likes inside of either the users or the posts entities as sub-documents because there could be thousands of them. Even with 256KB documents I'd run out of room pretty quickly. I need a way to quickly get the top 100 posts that a user liked (and continue to paginate from there). I also need to go the other way. I need to get all the…

    1,481 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    25 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →

    For applications that require cross document join, please consider the Gremlin API: https://docs.microsoft.com/en-us/azure/cosmos-db/create-graph-dotnet, which has primitives for joins, traversals, and other graph operations.

    We are evaluating expanding the SQL grammar to support graph functionality, which will provide the ability to perform cross-document JOINs. Please upvote this item to help us prioritize this work.

  2. Transaction support in client SDKs

    it would be useful if documentdb transactions are supported in .net, rather than just storedprocs and triggers.
    using trans = newtrans()
    try
    db.addsomething()
    db.save() //ok
    db.addother()
    db.save() //fail
    catch
    trans.rollback
    end try
    end using

    1,203 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    19 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  3. Set based operations (INSERT, UPDATE, DELETE)

    It would be nice to be able to update parts of documents, delete documents, and insert documents using set based operations, similar to SQL.

    e.g.
    UPDATE Users SET IsActive = 0 WHERE LastLogin < '2010-01-01'
    DELETE FROM Users WHERE LastLogin < '2009-01-01'
    INSERT INTO table2 SELECT * FROM table1

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

    There are multiple responses to this suggestion.

    Support for SQL-like syntax for UPDATE, DELETE and INSERT INTO are not on our road map at this time.

    However, the underlying functionality for an UPDATE, SET is essentially a PATCH. This functionality we are actively working on. See this User Voice item here to track for future updates. https://feedback.azure.com/forums/263030-azure-cosmos-db/suggestions/6693091-be-able-to-do-partial-updates-on-document

    Thank you for your suggestion.

  4. Support Document Versioning

    The ability to generate links to a previous version of a document would be a powerful addition DocumentDB that has many use cases.

    In my case I need a self managed profile document that needs to be referenced at point in time to be tied to an event.

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

    Azure Cosmos DB now provides the ability to access the change feed (https://docs.microsoft.com/en-us/azure/cosmos-db/change-feed). A common pattern to implement eventing patterns is

    1. Store every version/change as a separate item
    2. Read the change feed to merge/consolidate changes and trigger appropriate actions downstream.

    You can also expire old versions using TTL: https://docs.microsoft.com/en-us/azure/cosmos-db/time-to-live

  5. Add support for single entity retrieval instead of IEnumarable

    Single \ First and so are currently not supported in Document DB

    For example, the following code:

    return _client.CreateDocumentQuery<TEntity>(_collection.SelfLink).SingleOrDefault(x => x.Id == id);

    causes the error:

    An exception of type 'Microsoft.Azure.Documents.Linq.DocumentQueryException' occurred in Microsoft.Azure.Documents.Client.dll but was not handled in user code

    Additional information: Query expression is invalid, expression return type Entities.Models.Hierarchy is unsupported. Query must evaluate to IEnumerable.

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

    Thank you for your feedback. I have discussed this in more detail with our team.

    You are correct the workaround suggested to use .AsEnumerable().FirstOrDefault(). should not be a recommended work around. This way results in materializing all documents on the client first before getting the 1st document, which is not very efficient and the exact opposite of what you are trying to achieve.

    Instead we recommend you use Take(1).AsEnumerable() and then .First() or .Single() or .FirstOrDefault() for Single() and First(). Take(1) is translated to SELECT TOP 1 and is processed server-side so more efficient than the previous suggestion and is what you are trying to achieve.

    As to the original ask. The support for these operations can be done, but this work is not prioritized against the other work we want to deliver. I will move this back as unplanned but please note this is on our roadmap.

    Thanks again…

  6. Linq provider should respect JsonSerializerSettings ContractResolvers

    JsonSerializerSettings are now supported when creating the client, as per https://feedback.azure.com/forums/263030-azure-cosmos-db/suggestions/6422364-allow-me-to-set-jsonserializersettings

    However, when using for example a CamelCasePropertyNamesContractResolver to store the data, the linq queries will fail if the properties on the POCO classes are Pascal case.

    395 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    10 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  7. Add the ability to delete ALL data in a partition

    In a partitioned collection, it would be useful to have the option delete all data with a given partitionId.

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

    133 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    6 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  9. Sub-collections for multi-tenant applications

    In a multi tenant environment it is absolutely essential to limit results only to documents that belong to the current tenant. Adding a tenant name property to every document is not good enough because developers must ALWAYS remember to filter queries by that property. If they forget to do that the results can be devastating. It is also not possible to prevent that with tests.

    To use a separate collection for each tenant is too expensive with the current pricing structure.

    Please enable a possibility to add sub-collections that would act as a query boundary. They should also be a…

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

    Thank you for your suggestion. This is not currently on our road map.

    As suggested by others, customers are implementing this pattern using the same container with a partition key per tenant or a synthetic key with the tenant id and one or more other properties.

    Will mark this as unplanned and leave open and will revisit this in future planning cycles.

    Thank you for your suggestion and votes.

  10. stored procedures & functions in .NET (C#)

    Would be great to have the option to implement stored procedures, functions and triggers in .NET (C#) as well.

    49 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  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…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  12. 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: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  13. 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…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  14. 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.

    13 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  15. Support TTL that is fixed (not relative to last modified timestamp)

    The TTL function is great, but it would be very useful to have a method of ejecting a document at an exact time after it was created NOT modified.

    With the GDPR act coming into play very soon, having a datastore that has the potential to eject customer data at a specific time is very desirable because it prevents us having to roll our own deletion mechanisms.

    Please allow the the option of the TTL to be a fixed point in time and not be updated every time the document is modified.

    Thanks

    9 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  16. Like upsert, add a get or add function

    like ConcurrentDictionary, there is a GetOrAdd function,

    I frequently find my self doing the following
    1. Check if Document exists
    2. If not, Add document

    Since this is a non-atomic action, today I have to write stored procedures to do this safely.

    possible prototypes

    GetOrAdd(string id, DOC doc)
    GetOrAdd(Expression<Func<DOC, bool>> where, DOC doc)

    8 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  17. Gzip query response

    When data is returned from DocumentDb it does not respect the Accept-Encoding header. The DocumentDb SDK actually adds the Accept-Encoding header to the request but DocumentDb ignores it and does not compress the response data. For clients like Mobile (and even API requests) this would be an incredible savings for queries.

    5 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  18. 4 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  19. User Defined Document Functions (UDDF)

    Let's say you have some denormalized data:
    { id: '1, title: 'A story, userID: '1000' }
    { id: '2, title:' 'An article', userID: '1001' }
    where the userID field is denormalized into "user" documents.

    Since there are no cross-document joins, you have to loop result sets either in a DocumentDB Procedure or in the client to populate the 'user' data in the above example.

    There are several scenarios where looping result sets in a Procedure is the only viable solution (as opposed to looping on the client). This could be either performance and RU concerns, or simply network latenzy problems.

    3 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  20. Support LINQ Intersect

    I need the ability to see if a document property (which is a list) contains any list element in the query. Without this functionality, I find CosmosDB to be very limited.

    3 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
← Previous 1
  • Don't see your idea?

Azure Cosmos DB

Feedback and Knowledge Base