How to create several instances of a type from one line of a source file in a Transform?


In one of my source files, I have a column containing a list of ids (e.g. id2,id4,id5) for each row.
I want to create ONE instance of a relationship type for each id in this list.
Is there another way than using a custom transform function in the Transform that converts this Canonical to my relationship type, in which I create an array of such instances with RelationType.array() ?