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)
{\"code\":\"ValidationFailed\",\"message\":\"Twin is missing mandatory component ${ComponentNamePlaceholder}.\",\"details\":null}
Workaround:
Adding representation of empty Component to JSON Object representing Twin in NDJSON file.
"ComponentNamePlaceholder":{"$metadata":{}}
Question:
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!