I want to run a migration import but it only imported for me first 100 items (I didn't use --limit option!).

when running drush migrate-status I get this result:

Group: my_migrate       Total  Imported  Unprocessed  Status  Last imported
MIGRATION_CLASS_NAME     2197   100       2097         Idle    2015-10-01 12:37:31

when I try again with migrate-import it won't import any new item :

Processed 0 (0 created, 0 updated, 0 failed, 0 ignored) in 0.3 sec (0/min) - done with 'MIGRATION_CLASS_NAME'

(I rolled back migration and import again, and the same results : only 100 items!)

this is the class :

class MIGRATION_CLASS_NAME extends BaseMigration {
  public function __construct($arguments) {
    $this->description = t('From content type to Taxonomy terms');

    $this->map = new MigrateSQLMap($this->machineName,
        array('nid' => array(
                'type' => 'int',
                'not null' => TRUE,
                'description' => 'node ID.'


    // Create query
    $query = Database::getConnection('default', $this->sourceConnection)
            ->select(MIGRATION_DATABASE_NAME.'.node', 'n')
            ->condition('n.type', 'TYPE');

    $query->leftJoin('field_data_meta_description', 'md', '(md.entity_id = n.nid AND md.bundle = n.type)');
    $query->addField('md', 'meta_description_metatags_quick');

    $query->leftJoin('field_data_field_slide_beschreibung', 'b', '(b.entity_id = n.nid)');
    $query->addField('b', 'field_slide_beschreibung_value');

    $query->leftJoin('field_data_field_slide_motiv', 'i', '(i.entity_id = n.nid AND i.bundle = n.type)');
    $query->addField('i', 'field_slide_motiv_fid');

    $query->leftJoin('field_data_field_ref_tb_to_tax_teilgebiet', 't', '(t.entity_id = n.nid AND t.bundle = n.type)');
    $query->addField('t', 'field_ref_tb_to_tax_teilgebiet_tid');

    $query->leftJoin('field_data_field_ref_tb_to_bundes_jahr', 'l', '(l.entity_id = n.nid AND l.bundle = n.type)');
    $query->addField('l', 'field_ref_tb_to_bundes_jahr_tid');

    $this->source = new MigrateSourceSQL($query, array(), NULL,
  array('map_joinable' => FALSE)); // I tried also without "map_joinable" option.
    $this->destination = new MigrateDestinationTerm('TERM');

    //Make the mapping here



Has anyone get like this strange import before, or if you have any idea why it won't import. Thanks in advance.

  • Check your next item, if there are unknown chars or something like that. Maybe you can ignore this item and go on with the next one. – Huelfe Oct 1 '15 at 12:05
  • Implement public function prepareRow($row); to get a look at the 100th item. – cilefen Oct 1 '15 at 13:26
  • One of the joining query is for a taxonomy reference that has unlimited values, so in fact I have only 100 nodes to import but this huge number of entries to import is coming from this join. Thanks guys for your suggestions that help me figure out where is the problem ;) – Boussetta moez Oct 2 '15 at 9:39

Your Answer

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

Browse other questions tagged or ask your own question.