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

marcin.rejdych 20 Reputation points
2023-05-26T13:25:20.7733333+00:00

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}

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!

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

1 answer

Sort by: Most helpful
  1. LeelaRajeshSayana-MSFT 13,951 Reputation points
    2023-05-31T13:01:54.0733333+00:00

    Hi @marcin.rejdych Thank you for sharing your insights on this product.

    You can share product feedback on this feature using the following link Azure Digital Twins Feature Request Kindly share the link on this thread once you have created a request. Other community members needing a similar feature can help upvote it.

    I am also checking with the product team internally on any alternate better approaches we can take to address this. I will update this thread once I have more information.


    If the response helped, please do click Accept Answer and Yes. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.

    0 comments No comments