1

In the Azure Digital Twin (ADT) limitation:

https://learn.microsoft.com/en-us/azure/digital-twins/reference-service-limits

there is a limitation on the "number of models within a single Azure Digital Twins instance".

My questions: how to count the number of models in ADT? what is counted as a single model in ADT?

TylerH
  • 20,799
  • 66
  • 75
  • 101
angin
  • 23
  • 3

1 Answers1

2

You can get all the models by using the az CLI, there is a model list command that you can use. Alternatively, you can use any of the SDKs to do the same. I get the number of models by adding a JMESPath query to it:

az dt model list -n <adt-name> --query "length(@)"

This will only return the number of models.

Matthijs van der Veer
  • 3,865
  • 2
  • 12
  • 22
  • Considering the example about "planet" in https://learn.microsoft.com/en-gb/azure/digital-twins/concepts-models where we have "planet", "crater", and "moon", Could we say that we have 3 models here? Could we say that the nummer of models is equal to the number of interfaces/entities/concepts? – angin Feb 16 '21 at 13:23
  • 2
    In that example, you have 3 models. Every model is of @type 'interface' at this moment (DTDL V2). – Matthijs van der Veer Feb 16 '21 at 13:51
  • Thanks for the answer! What about the number of twins (also in https://learn.microsoft.com/en-us/azure/digital-twins/reference-service-limits)? Is it based on the total number of instances of all interfaces? For instance, in that example, if we have: "Jupiter" & "Earth" as the only instances of "planet" interface, and "callisto" & "ganimede" as the only instances of the "moon" interface, can we say that we have 4 twins? – angin Feb 17 '21 at 10:26
  • 1
    Correct again, 4 twins. A twin is an instance of a model. Feel free to mark my answer as accepted if it helped you! – Matthijs van der Veer Feb 17 '21 at 13:19