Azure Digital Twins Import Jobs Api - import job fails when empty Twin's component is missing

marcin.rejdych 20 Reputation points

Details of our use case:

  • We want to implement our Azure Digital Twins Backup and Restore procedure by using Azure Digital Twins Import Jobs API and NDJSON files.
  • Our Digital Twin's Model have few Components declared
  • We are using ADT Data History to fill 3 ADX tables with data
    • Table with Twin lifecycle events
    • Table with Twin properties update events
    • Table with Relationship lifecycle events
  • We are using data from these ADX tables to create NDJSON file, which will later be used to restore state of Azure Digital Twin
  • During exporting of NDJSON file to Blob Storage we do not have access to information about Digital Twin Models
    • Our NDJSON file contains sections: "Header", "Twins", and "Relationships" (no "Models")
    • We intend to import our Digital Twins Models using different method (before Import Jobs API - Add will be executed)
    Description of our problem: When properties of Digital Twin's Component were not updated and Component is "empty", then Twin properties update event was not sent. It means, that information about this Component are not present in ADX database. When we want to import NDJSON file using Import Jobs - Add API to restore state of Azure Digital Twins, job is failing with following error:
   {\"code\":\"ValidationFailed\",\"message\":\"Twin is missing mandatory component ${ComponentNamePlaceholder}.\",\"details\":null}


Adding representation of empty Component to JSON Object representing Twin in NDJSON file.



Do you have any advice how to handle such situation without having information about Digital Twin models during creation of NDJSON file?

Considering the fact, that Import Jobs API is currently in Preview, could you consider feedback to change its behaviour to import Twin with "empty" Component when Twin's Component is missing in NDJSON file instead of rejecting such Twin?

Thank you for your help!

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.
153 questions
{count} votes