4

I used the Data Migration Tool 2.0.2 for Magento 2.0.4.

I started the command line:

php bin/magento migrate:data <source of config.xml>

and get the Error in Step Log Step:

Source documents are not mapped: log_visitor
Destination documents are not mapped: customer_visitor

So I added ignore tags for customer_visitor and log_visitor in map-log.xml:

<source>
    <document_rules>
        <rename>
            <document>log_visitor</document>
            <to>customer_visitor</to>
        </rename>
        <ignore>
            <document>log_visitor</document>
        </ignore>
    </document_rules>
    <field_rules>
        <ignore>
            <field>log_visitor.first_visit_at</field>
        </ignore>
        <ignore>
            <field>log_visitor.last_url_id</field>
        </ignore>
        <ignore>
            <field>log_visitor.store_id</field>
        </ignore>
    </field_rules>
</source>
<destination>
    <document_rules>
        <ignore>
            <document>log_visitor</document>
        </ignore>
        <ignore>
            <document>customer_visitor</document>
        </ignore>
    </document_rules>
    <field_rules>
        <ignore>
            <field>customer_visitor.customer_id</field>
        </ignore>
    </field_rules>
</destination>

After this I still get the error in Step Log Step:

Destination documents are not mapped: 0

What I have to do?

2
  • If I deleted <source><document_rules><ignore>log_visitor in map-log.xml I get the error: "Source documents are not mapped: log_visitor" But no "Destination documents are not mapped: 0" anymore. Any idea?
    – Guest
    Commented Apr 25, 2016 at 7:52
  • is there a reason you are not using the same data-migration tool as the magento install?
    – circlesix
    Commented Feb 26, 2017 at 4:33

2 Answers 2

3

If anybody else runs into this issue, make sure the log_visitor, log_visitor_info, log_url, log_url_info and log_visitor_online tables are in the source database. Since the log_visitor table grows to be Gigabytes in size, I've seen many database backups and migrations where those tables were left out.

The option could be to truncate these large tables in the source database (especially if its an offline copy) before migration:

TRUNCATE TABLE log_url;
TRUNCATE TABLE log_visitor ;
TRUNCATE TABLE log_url_info ;
TRUNCATE TABLE log_visitor_info;
2
  • I think this should be the accepted answer. Thank you Gary Commented Jan 10, 2019 at 17:46
  • Just to add, even though you need all the log tables to be present, they can be truncated in the source database before migrating. This ensures the log step doesn't take hours for most likely less essential data. TRUNCATE TABLE log_visitor etc . These tables should be safe : log_url, log_url_info, log_visitor, log_visitor_info Commented Mar 16, 2021 at 11:44
0

You absolutely have to use the same exact data migration tool version as your magento2 version, that's probably your problem because I've never had to modify the map-log file.

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.