Hi there,
I’m working on an “API first” relational migrator. Here is how I would achieve this with my tool:
Step 0: create target collection , here called “Units”:

Step 1: export Ids from the source rdbms to the target (this will ensure correspondance for all further transformations):

Step 2: define embedded properties



Step 3: then populate data with relevant queries




Sample result:
before:
after:

Let me know, if you’re interested to know more