question

AnthonyKerfyser-2413 avatar image
1 Vote"
AnthonyKerfyser-2413 asked AnthonyKerfyser-2413 commented

How to delete quickly ADT content?

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
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AnthonyKerfyser-2413 Welcome to Microsoft Q&A forum!
When you say, "when trying via ADT explorer, the query does not complete" Are you seeing any error message? Is it failing?
Did you try using SDK?

0 Votes 0 ·

1 Answer

MatthijsvdVeer avatar image
1 Vote"
MatthijsvdVeer answered AnthonyKerfyser-2413 commented

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for the SDK suggestion, we will have to try that then !

0 Votes 0 ·