0

In the source D7, i have a content type 'article' containing a reference to a 'category' taxonomy vocabulary term.

In the target D8, I have a content type 'article' as well, but i only want to import those nodes whose 'category' reference does not equal 'interview' ('interview' is one of its terms).

Also, in the target D8, i have a content type 'interview' to which i want to import all D7's 'article' nodes whose 'category' reference equals 'interview'.

Any ideas how to condition this?

1
  • 1
    You can implement a process plugin and set it on that field. Process plugins can throw a api.drupal.org/api/drupal/…, in which case the record is skipped and not imported. either implement one that is configurable or two different ones that skip all the records that you don't want. You might also be able to use a map plugin and map the ids that you do want to migrate, skipping those that you don't. See
    – Berdir
    Commented Mar 16, 2018 at 19:04

1 Answer 1

0

Besides setting up a process plugin for the migrate import mapping (via code) as suggested by Berdir in the comments, another option is to setup a views data export on the legacy site to output only the select articles or "interviews".

This approach also allows non-database admins or developers to easily audit the content being migrated (because you can setup an alternative view display as a webpage, or excel spreadsheet, for use as a checklist).

To setup a view in JSON format:

Refer to this StackOverflow answer/post about setting up a JSON view display mode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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