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”:
image

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

Step 2: define embedded properties
image

image

image

Step 3: then populate data with relevant queries
image

image

image

image

Sample result:
before:

after:
image

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