Scenario: Working with IoT Digital Twins
To set up your digital twins you can work with the digital twin instances, adapters, relationships, and models.
Use these concepts to work with digital twin resources.
When you receive unstructured data, you must create a digital twin instance. A digital twin model and adapter are not required, see Scenario: Sending Unstructured Data Using HTTPs.
When you receive structured data, you must create a digital twin instance, a model, and an adapter.
- Digital Twin Models: A digital twin model defines the semantics of a digital twin and is based on the DTDL v3 specifications. A digital twin uses a Digital Twin Model Identifier (DTMI) as a unique identifier.
For example:
dtmi:com:yourcompany:iot:example;1
- Digital Twin Adapters: Translate data to digital twin models for data snapshots and if configured, captures historized data. The data passed to the digital twin adapter is a JSON object containing the data and mapping. Digital twin adapters are required for structured data.
- Default adapter format: If the device can be programmed to send data in the format you want to work with, then create a default digital twin adapter. For a specific example, see Scenario: Sending Structured Data in a Default Format using HTTPs.
- Custom adapter format: If the device can not be programmed to send data in the format you want to work with, then create a custom digital twin adapter. For a specific example, see Scenario: Sending Structured Data in a Custom Format using HTTPs.
- Digital Twin Relationships: Connects multiple digital twin instances. If a digital twin relationship links to a digital twin instance then you can create a graph of the digital twin and its relationships to other digital twin instances. For a specific example, see Scenario: Query a Digital Twin Relationship.