1

I'm trying to use the Migrate API module to implement an ETL for some of the content of my Drupal 8 website, but the documentation doesn't explain how to execute the migration once everything has been set up. It only explains how to execute the migration using some contributed modules but not how to execute it using the Drupal API.

Can someone point me to the right documentation or at least give some hints?

closed as off-topic by kiamlaluno Nov 7 '18 at 13:46

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking to recommend or find a book, tool, module, theme, distribution, tutorial, or other off-site resource are off-topic for Drupal Answers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – kiamlaluno
If this question can be reworded to fit the rules in the help center, please edit the question.

3

Drupal 8 Migrations are plugins. So you can create instance and execute like this:

<?php

use Drupal\migrate\MigrateExecutable;
use Drupal\migrate\MigrateMessage;


$migration_id = 'MIGRATION_ID';
$migration = \Drupal::service('plugin.manager.migration')->createInstance($migration_id);
$executable = new MigrateExecutable($migration, new MigrateMessage());
$executable->import();

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