Migrations in Drupal 8 are very stable and highly extensible. Still there are many cases though which would require custom code. I came accross one such scenario recently and will share some knowledge here which I gathered while working on it.
One - most of the examples shared are around process plugin or the plugins available in migrate (part of Drupal core) / migrate_plus modules. Ones that I browsed:
Usually all data that is expected in Drupal needs to have a unique id. For instance if we want to migrate multiple images into a multi-value field, we need fid or we can consider even file path as unique key and migrate it. So first migration would migrate all the files into File entity and store mapping for external unique key (fid or file path) and internal File entity id. Now for the actual content migration we use migration_lookup plugin. Here, it will fail for scenario where field doesn't have unique value accross multiple content.
So in my case I had a document, it has ID and a multi value field for - type and system for instance. These both type and system are inturn taxonomy terms and are coming from another migration. Now this multi-value field is stored as a paragraph into system since field collections are getting deprecated.
Here, as you can see there are two main issues.