Azure Cosmos DB Preview Version API

Raman Sharma 41 Reputation points Microsoft Employee
2022-11-17T05:17:12.93+00:00

Hi,

I need to use the API DeleteAllItemsByPartitionKeyStreamAsync (https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-delete-by-partition-key?tabs=dotnet-example) for one of my usecase. According to the documentation, this API is only available to preview versions. I have following doubts, can someone please help me with them questions:

  1. The DeleteAllItemsByPartitionKeyStreamAsync API was in the version 3.25 as preview, in version 3.31.2 it needs preview version, why does this API not release in stable versions?
  2. Is there any other API that can do the work of deleteing all items in a partition.

Thanks,
Raman

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
{count} votes

Answer accepted by question author
  1. SSingh-MSFT 16,461 Reputation points Moderator
    2022-11-18T06:55:55.91+00:00

    Hi @Raman Sharma ,

    Thanks for your patience.

    Internal team has replied that in interest of stabilizing this implementation to perform Delete All Items by Partition Key of Cosmos DB.- this feature is pushed out to later part of H2.
    It is suggested by them to perform explicit deletes of all data. That is the right way to amortize the costs.

    Hope this will help. Please let us know if any further queries.

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification

2 additional answers

Sort by: Most helpful
  1. SSingh-MSFT 16,461 Reputation points Moderator
    2022-11-17T11:37:58.987+00:00

    Hi @Raman Sharma ,

    Welcome to Microsoft Q&A platform and thanks for using Azure services.

    As I understand your ask, you want to perform Delete All Items by Partition Key of Cosmos DB.

    I will check on this internally and let you know any API exists apart from DeleteAllItemsByPartitionKeyStreamAsync

    Deletion could also be performed using Azure Data Factory as explained in this article Bulk Delete Documents in Azure Cosmos DB Container using Azure Data Factory

    1 person found this answer helpful.
    0 comments No comments

  2. SSingh-MSFT 16,461 Reputation points Moderator
    2023-11-23T08:18:58.3+00:00

    Hi Anders Fredborg,

    Refer to https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-delete-by-partition-key?tabs=dotnet-example

    Delete items by partition key value is in public preview. This feature is provided without a service level agreement, and it's not recommended for production workloads. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.

    Thanks

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.