0

I've got a CSV where every row contains details about a node and then a URL to a file.

Each of the nodes rows has an id number associated representing each specific node.

So eg:

id, node name, file url
1, farfitnugen, /documents/foo.pdf
1, farfitnugen, /documents/bar.pdf
2, farfitnugen, /documents/2foo.pdf
2, farfitnugen, /documents/2bar.pdf

Using the example above, I've got the migration working such that it creates one record for each node, and downloads and links the appropriate file, but it does not cycle all the entries.

I'm currently mapping by the id, can anyone provide a suggestion of how to get Migrate to import all the documents per node?

0

I coded two imports; one for the files and one for the nodes. The nodes import then references the files using the oncomplete callback that the migration api provides. Thank you to the Drupal irc channel for pointing out the oncomplete function.

Special thanks to stack exchange for the most depressing achievement ever, the tumbleweed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.