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. [DocumentDB] Allow Paging (skip/take)

    Allowing paging would be huge. Btw, Thank You for rolling out this feature at all! It looks wonderful! Can't wait to try it! However, I won't be able to use it for actual work projects until it supports paging and sorting.

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

    Work on making this feature available in all SDK’s as well as cross-partition is now available so marking this as complete.

    The team has seen your feedback regarding performance for queries with especially large OFFSET values and is currently working on optimizing these by better utilizing the index and further improving performance. These optimizations will be released shortly.

    For more information on Offset/Limit please see, https://docs.microsoft.com/en-us/azure/cosmos-db/sql-query-offset-limit

    Thank you.

  2. Add Group By support for Aggregate Functions

    We're really happy about the new aggregate functions that recently were announced. But without Group By support they fall short and will leave many disappointed. Please add Group By support as well.

    2,833 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    92 comments  ·  SQL API  ·  Flag idea as inappropriate…  ·  Admin →
  3. Allow multi Order By

    From what I see it is impossible to run a query with more than one column in the Order By.

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

    279 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 →
  5. Support sub-query functions like EXISTS, NOT EXISTS

    It would be great to query within document array's without having to join them in the root's FROM-clause.
    (And likely, this also the creates the possibility to implement LINQ support for Any() and All())
    example:
    SELECT author
    FROM author
    WHERE EXISTS

                   (SELECT b 
    
    FROM author.Books b
    WHERE b.YearOfPublishing < 1980)

    Although there are workarounds they all have nasty side effects:
    1: In the following example the join results in non-unique results due to multiple books published before 1980 within single author-document:
    SELECT author

     FROM author
    
    JOIN b IN author.Books

    WHERE b.YearOfPublishing < 1980

    2: In the following example a UDF…

    188 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 →
  6. Support LINQ ANY or WHERE for child object collections

    Example trying to query Sales

    var querySales = DocumentDb.Client.CreateDocumentQuery<Sale>(collectionLink)

                  .Where(q =&gt; q.Type == &quot;Sale&quot; &amp;&amp; q.Stage &lt;= 99 &amp;&amp; q.InvolvedParties.Any(qq =&gt; qq.Id == userId))
    

    Buy ANY not supported

    Also tried
    .Where(q => q.Type == "Sale" && q.Stage <= 99 && q.InvolvedParties.Where(qq => qq.Id == advisorUserId).Count() > 0)

    get WHERE not supported

    Really want the DB to perform the search as a lot of results will come back.

    sample data:
    {
    "id": "af10eebf-b0b6-49d5-8db5-96f54c4985d2",
    "Type": "Sale",
    "GroupId": 1,
    "InvolvedParties": [

    {
    
    &quot;Id&quot;: &quot;344595a3-4e73-4bd5-9988-849858f045f1&quot;,
    &quot;PartyType&quot;: 0,
    &quot;Name&quot;: &quot;test user&quot;
    }

    ],

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

    129 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. Add built-in cast function for SQL queries

    Need built-in function for casting string datatypes to INT, NUMBER, DOUBLE, etc. in SQL queries as our data loader is converting the number to string during document creation. We have a requirement to filter on numeric values in our application.

    64 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 →
  9. .NET SDK support in UWP apps

    The following message is generated if one attempts to add the Microsoft.Azure.DocumentDb nuget package to a Universal Windows Platform app:
    Some packages are not compatible with UAP,Version=v10.0 (win10-x64-aot).

    50 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 →
  10. 26 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. Add support for ThenBy/ThenByDescending when ordering using LINQ

    I know multi-ordering has been added to the SQL API if constructing the SQL statements manually recently but really this change also needs to be reflected within DocumentDB LINQ querying too, currently attempting to use ThenBy or ThenByDescending throws an unsupported exception

    23 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. 10 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 →
  13. Be able to use the OFFSET LIMIT clause with cross-partition queries

    In order to scale our collections, we need to define a partition key, and with scaling comes pagination, so the new OFFSET LIMIT clause becomes appealing, but right now the SDK doesn't support cross-partition queries with this new clause.

    In my case, I cannot use the Continuation Token because I need to be able to come back to previous pages, and the CT is forward-only.

    10 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. Expose Min / Max RU/s for a collection through the SDK

    Currently the minimum and maximum RU/s for a collection aren't exposed through the SDK. These values are transient and may change so it is not possible, when programmatically scaling a collection, to know what the minimum / maximum RU/s that can be provisioned are.

    These attributes are already exposed through the Azure Portal however, it would be great if they could also be exposed through the SDK for use in automation scripts.

    10 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. Upgrade the JavaScript engine to support ES6 in Stored procedures

    If I try to write a stored procedure using ES6 constructs such as let/const I now get errors:


    function() {

        const context = getContext();
    
    const collection = context.getCollection();
    ...
    }


    4 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 →
  16. Cosmos DB Explorer running on Electron Desktop App

    Thank you for releasing Cosmos DB Explorer.
    I think that it is even better if this becomes Electron desktop application. Or I think that it may be integrated into Storage Explorer.

    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 →
  17. Provide a way to change Throughput for Cosmos in Runbooks

    I can change Throughput with CLI but you can't use CLI in an Automation Runbook. You can use Powershell in an Automation Runbook but Powershell doen't have a command to change Throughput. So either allow Runbook to run CLI or add a Powershell command to change Throughput.

    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 →
  18. Change Database Level Throughput

    The article located at https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-provision-database-throughput shows an example of how to create a database account programmatically with a certain throughput at the database level. I am unable to find an api example of how to change the throughput for an already created database. Examples exist for changing the throughput at the collection level, but not at the database level.

    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 →

    Thanks for pointing this out. We will update our docs to show how to do this.

    Here is a sample that shows how to do it.

    Database database = await client.ReadDatabaseAsync(this.databaseUri); //Get the current offer Offer offer = client.CreateOfferQuery() .Where(r => r.ResourceLink == database.SelfLink) .AsEnumerable() .SingleOrDefault(); // Set the throughput to 5000 request units per second offer = new OfferV2(offer, 5000); // Now persist these changes to the database by replacing the original resource await client.ReplaceOfferAsync(offer);
  19. Get current RequestCharge inside stored procedures and post triggers

    It would be nice to be able to access the current 'RequestCharge' value (as it appears in the final response) from within a post trigger or even a stored procedure.
    It would allow for easier cost monitoring mechanisms on the developers' side.

    2 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 →
  20. SQL API Multiple SelectMany in Azure Cosmos DB

    I have to use multiple SelectMany statements in my code and use all of them in Where clause as follows. I am able to come up with a SQL query but not able to do same with LINQ.

    .SelectMany(a => a.Persons)
    .SelectMany(b => b.Addresses)
    .SelectMany(b => c.Companies)
    .Where(person => person.lastName == "Smith")
    .Where(address => address.zipCode == "15219")
    .Where(company => company.city == "Pittsburgh")
    .Select(new => { person.someThing, address.something, company.something })

    Any suggestions?

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

Feedback and Knowledge Base