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.
  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. Implement LIKE keyword

    Add support for the LIKE '%%' SQL keyword and associated functionality.

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

    793 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    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

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

    629 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 →
  4. 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.

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

  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.

    468 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 →
  6. Support ORDER BY on the ST_DISTANCE spatial function

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

    445 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 →
  7. Add DateTimeOffset support

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

    163 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 →
  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();

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

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

    76 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. Compress query results

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

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

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

    51 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. 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
    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 →
  15. 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;:
    24 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    3 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é"

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

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

    19 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. delete All data in a container

    To be able to delete, all the data in a container through azure UI.
    -> Keep all the settings, just drop all the data.
    this is useful during development when we have to delete and recreate a container and then recreate all SP, UDF, etc manually, and recreate all the indexes. It saves a lot of development time and reduces errors as cosmos is a case sensitive database.

    14 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 →

    Thank you for your suggestion. At this time this is not on our road map.

    Currently customers tend to include the definition of their databases, containers, stored procedures and UDF’s either within their main applications themselves (CreateIfNotExists) or as standalone applications. Then include in their deployment pipelines using custom tasks so they can accurately recreate their environments, rather than creating resources by hand in the portal or elsewhere. This also allows them to be managed as artifacts in their source code repositories so they can be accurately recreated.

    We are currently investigating building support for deploying stored procedures and UDF’s via ARM templates which may work for you to quickly and easily re-provision your environments. But we have not concluded our initial look on this at this so do not have an ETA for that at this time.

    Thank you.

← Previous 1 3
  • Don't see your idea?

Feedback and Knowledge Base