Have a question about CiviCRM? Get it answered quickly at the new CiviCRM Stack Exchange Q+A siteThis forum was archived on 25 November 2017. Learn more.How to get involved.What to do if you think you've found a bug.
hey chang:i just spoke with wes (who wrote the sql importer part of the code) and we tried to track back who wrote the code and did not succeed (the branch it was developed on was deleted after the merge). If i had to guess, a lot of it was trying to write a good abstraction that we would move into at some pointSo i dont think we store the various config options (group/tag/mapping etc) in the db currentlyI've been thinking about the batch import process, i think we need 3 calls:civicrm_import_create_table( $fileName ); // creates and return the table name// import rows from $offset to $offset + $limit from $tableName// the import parameters are in the params arraycivicrm_import_import_rows( $tableName, $offset, $limit, $params )civicrm_import_delete_table( $tableName ); // drops the tablethings are getting a bit better now, so i can work with you on the above interface and get it going. Would be good to design a set of unit tests that we can use to test functionality before we write code. will help us improve the import code this wayping me on IRC if the above makes sense and we can get the ball rollinglobo
civicrm_import_create_table( $fileName );civicrm_import_import_rows( $tableName, $offset, $limit, $params )civicrm_import_delete_table( $tableName );
array( 'type' => 'contact', 'date_format' => 'mm/dd/yyyy', 'dupe_check' => 'overwrite', 'error_report' => FALSE, 'groups_id_add' => array(5, 6), 'tags_id_add' => array(6, 7), 'geocode' => FALSE, 'mapping' => array( 0 => 'first_name', 1 => 'middle_name', 2 => 'last_name', 3 => 'email', 4 => 'phone', 4 => 'street_address', 5 => 'supplemental_address_1', 6 => 'city', 7 => 'state_province', 8 => 'country', 9 => 'custom_1', 10 => 'custom_2', ),);
That sounds good Matt! Are you saying it is part of the import API, or are you creating a separate solution that you can share with us?Erik