How to delete quickly ADT content?

Anthony Kerfyser 6 Reputation points
2021-10-18T13:54:53.583+00:00

We are habing trouble deleting all content of our ADT.
Because of refresh of data, we need to delete all twins of our ADT. We have around 18000 twins with no relationships and when trying via ADT explorer, the query does not complete.
So for now, we are using the "az dt twin delete-all" command but it takes around 3 hours.

What can we do to speed up this process ?

Azure Digital Twins
Azure Digital Twins
An Azure platform that is used to create digital representations of real-world things, places, business processes, and people.
231 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Matthijs van der Veer 4,376 Reputation points MVP
    2021-10-20T09:15:30.657+00:00

    The best way to do this would be to use the SDK and write your own small implementation. The az dt twin delete-all command might try to delete everything on a single thread, or query for relationships, which will take a long time. If you have no relationships, you need to first query all the twins, and then delete them in parallel. Deleting them in parallel should allow you to do 18000 items with no relationships in a matter of minutes. The only thing to take into account is that there is a service limit of 150 API calls per second, so make sure you stay within those limits (or write some retry logic to deal with it)

    1 person found this answer helpful.

Your answer

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