Is it possible to include extra arguments when migrating via command line? Is it possible to include extra arguments when migrating via command line?

I have a custom migration which migrates XML content into Drupal as entities. However, each XML document of migrated entities need to be associated with a different node.

I'm successfully doing this entities to node association via the following code:

function complete($entity, stdClass $row) {
    $node = node_load(1);
    $node-&gt;field_questions[$node-&gt;language][ sizeof($node-&gt;field_questions[$node-&gt;language]) ]['target_id'] = $entity-&gt;id;
    node_save($node);
}


As you can see from the code, the NID is hardcoded. Of course, the NID could be extracted from the XML input but it is unknown in advance of the migration.

So, I just wonder if running drush migrate Questions could be run with custom arguments where I could specify the target NID to associate my migrations with?
Something like, drush migrate Questions --nid=10
In the URL below you can find Dush arguments for migrations. Following the documentation you need --idlist argument.



See here https://www.drupal.org/node/1561820

Hope that helps.