Hi David.
When in a migration object (for example, FACTS), click "Utilities - Structure display - Display customer structure". There, you will see entries like "Struct.: EANLHKEY DataType: KEY". It means that, in your text file, you should have a structure named "KEY", for example:
ksm1 KEY data1 data2
No matter how nested they are, they have their own unique identificator.
Hope it helps.
Marko