Update: Microsoft will be moving away from UserVoice sites on a product-by-product basis throughout the 2021 calendar year. We will leverage 1st party solutions for customer feedback. Learn more here.

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.

Azure Synapse Link: Features related to Azure Cosmos DBanalytical store and Azure Synapse Analytics run-time support

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.

Managed Apache Cassandra: Featuresand capabilities related to Azure Managed Instance for Apache Cassandra.
  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. 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.

    804 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    12 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

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

    674 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    22 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  3. 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.

    513 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    8 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…

  4. Support ORDER BY on the ST_DISTANCE spatial function

    Ordering results by the ST_DISTANCE spatial function is currently not supported.

    497 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    20 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  5. 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.

    476 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

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

    230 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    16 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  7. Add DateTimeOffset support

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

    167 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    8 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  8. Support OrderBy and OrderByDescending in Nested Arrays

    For example in a document structure such as:

    {
    "id": "some id",
    "things": [

    { &quot;value&quot;: &quot;5&quot; },
    
    { &quot;value&quot;: &quot;2&quot; },
    { &quot;value: &quot;7&quot; }

    ]
    }

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

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

    159 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    6 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  9. 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.

    119 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    8 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  10. Use Order By with Group By

    In the documentation for group by (https://docs.microsoft.com/en-us/azure/cosmos-db/sql-query-group-by) you state:

    You currently cannot use GROUP BY with an ORDER BY clause but this is planned.

    Adding here so we can hopefully get some feedback on its progress and to communicate its importance to the community.

    In all my use cases for using group by, I am only interested in returning a subset of the results which without order by I cannot. I must return all results and then order & filter them in the client which is poor from a performance and cost perspective or completely unfeasible depending on…

    106 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  11. DISTINCT should use index if possible

    Currently one can query distinct values from documents using the DISTINCT keyword like in relational SQL.

    Example:

    SELECT distinct c.myField FROM c
    

    Related feature request: https://feedback.azure.com/forums/263030-azure-cosmos-db/suggestions/6719531-provide-support-for-distinct

    Unfortunately current DISTINCT is rather unusable as it seems to do a full scan even if there is an index present on the field. This feature does save some bandwidth when you really-really-really need this feature, but the RU consumption part is borderline-unacceptable for production use.

    Please consider improving the implementation to avoid full scan and use index, if possible.

    94 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    4 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  12. Unique indexes on existing collections

    Currently, CosmosDB requires unique indexes to be created before inserting data in an empty collection. MongoRestore creates indexes after importing data, which is incompatible with CosmosDB's flow, and forces the user to create unique indexes manually in order to import data. This is impractical for those who require daily imports on several collections. CosmosDB should be able to import data using MongoRestore's flow, by allowing unique indexes to be created after inserting data.

    82 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  13. Compress query results

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

    67 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  14. Support left join

    We have a need for the current JOIN mechanism to allow for LEFT JOIN's.

    So code like this:
    SELECT
    c.myId,
    (IS_DEFINED(dm.code) ? tm.code : dm.code) as code
    FROM c
    JOIN dm in c.modelData
    JOIN tm in c.modelData
    WHERE c.partitionKey="8"
    AND dm.dataScope = "default"
    and tm.dataScope = "other"

    on data like this:
    [

    {
    
    &quot;myId&quot;: &quot;1&quot;,
    &quot;partitionKey&quot;: &quot;8&quot;,
    &quot;values&quot;: [
    {
    &quot;dataScope&quot;: &quot;default&quot;,
    &quot;code&quot;: &quot;1&quot;
    },
    {
    &quot;dataScope&quot;: &quot;other&quot;,
    &quot;code&quot;: &quot;1a&quot;
    }
    ],
    &quot;id&quot;: &quot;ba884879-9b9b-3ff2-dc08-ca6168892ca5&quot;
    },
    {
    &quot;myId&quot;: &quot;2&quot;,
    &quot;partitionKey&quot;: &quot;8&quot;,
    &quot;values&quot;: [
    {
    &quot;dataScope&quot;: &quot;default&quot;,
    &quot;code&quot;: &quot;1a&quot;
    },
    {
    &quot;dataScope&quot;: &quot;other&quot;,
    &quot;code&quot;: &quot;2&quot;
    }
    ],
    &quot;id&quot;: &quot;864625c2-50de-5d56-9626-26b04d8ff1f2&quot;
    },
    {
    &quot;myId&quot;:
    31 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    3 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  15. 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.

    26 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  16. 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é"

    26 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  17. Add HAVING clause

    Now that group by is supported, if you add having clause functionality, it would be helpful.

    24 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  18. 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.

    21 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  19. Group By should use the Index

    Group By performance is really bad.
    It is unusable without Index support.

    Please please please add Index support.

    21 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  20. Please add function that can sort array property in document with using like "ORDER BY".

    Please add function that can sort array property in document with using like "ORDER BY".

    For example,
    1.Let's assume we use this query to specify document
    ( SELECT c.Contents FROM c WHERE c.id = 'id1')
     
    2.And the document is below.
    ▼Document▼
    {
        'type': 'Test',
        'id': 'id1',
        'Contents': [
            {
                'contentId': 'C1',
                'created': '2018-11-21T00:00:00+09:00',
                'content': 'content1'
            },
            {
                 'contentId': 'C3',
                'created': '2018-11-21T17:00:00+09:00',
                'content': 'content3'
            },
            {
                 'contentId': 'C2',
                'created': '2018-11-21T09:00:00+09:00',
                'content': 'content2'
            }
        ]
    }
     
    3.We want to do is below.
    (Sorting array(Messages) by 'created' time)
     
    ▼Result We want▼
    [
        {
            'Contents': [
                {
                    'contentId': 'C1',
                    'created': '2018-11-21T00:00:00+09:00', …

    21 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

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

Feedback and Knowledge Base