Process core contact imports
It would be nice to be able to use the core import for contacts, for example, which has a really good field mapper, but it can't deal with very large imports, and doesn't handle errors very well.
- Core creates a
tmp_d
table with the uploaded data -
Contact/Import/Form/Preview
calls$importJob->runImport($this);
, which then calls$this->_parser->run()
to do the actual import (CRM_Contact_Import_Parser), which callsimport()
from theCRM_Contact_Import_Parser_Contact
class for a single row.
Since the tmp table only gets deleted when the import finished (or fails), we could probably hook in the form and add a button "improt with advimport", and then take over the process from there.
The main thing I haven't figured out, is how the mapping is used on the values from the SQL table. How the does import know that foo_name_5
from the tmp table, maps to "Middle Name", for example?