CSV import problems
-
Hi there,
I have a problem while importing data from a csv file.
Unfortunately this error doesn’t always occur, but most of the time it does so that the import is not reliable. It also doesn’t matter which delimiter or enclosure character I use.I have a file that looks like this (of course in UTF-8):
hull_number;ship_name;year_built;location___city;country;owner_imported;description;data_source;status;email_imported;email 1751;Rigoletto;1973;Down Cruising Club;United Kingdom;Michael McDermott;RIGOLETTO (formerly Elkedor) moved from Fareham to Strangford in 2008;VEGADB;imported;mjmcd1@test.com;mig1751@hotmail.com 0002;Elvira;1966;Traelhavets baatklubb;Sweden;Ingemar Baeck;Original Albin O21 is replaced with a Beta 13 hp;VEGADB;imported;ibackaa@test.com;mig0002@hotmail.com
When I import it I get the following messages:
The file ximport_test1.csv has been uploaded. File upload complete: 2 lines received. The data is importing in the background, refresh the page to get the current status of the import. Participants Database: Import Complete: 2 records added 2 records imported
After the import I see that several columns are emtpy, i.e. hull number or email, but most important of course no private ID is created.
When I turn on debug log, I see that all columns are recognized while populating the array, but some columns are missing in the following INSERT-Statement:[03/05/22 11:55am UTC] xnau_CSV_Import::insert_from_csv columns:hull_number, ship_name, year_built, location___city, country, owner_imported, description, data_source, status, email_imported, email csv line= Array ( [hull_number] => 1751 [ship_name] => Rigoletto [year_built] => 1973 [location___city] => Down Cruising Club [country] => United Kingdom [owner_imported] => Michael McDermott [description] => RIGOLETTO (formerly Elkedor) moved from Fareham to Strangford in 2008 [data_source] => VEGADB [status] => imported [email_imported] => mjmcd1@test.com [email] => mig1751@hotmail.com ) PDb_submission\match\record::field_value_exists query: SELECT EXISTS( SELECT 1 FROM wp1_participants_database p WHERE p.email = 'mig1751@hotmail.com' AND p.id <> '0' ) PDb_submission\main_query\base_query::execute_query storing record: INSERT INTO wp1_participants_database SET 'date_recorded' = "2022-03-05 11:55:21", 'date_updated' = "2022-03-05 11:55:21", 'ship_name' = 'Rigoletto', 'year_built' = '1973', 'location___city' = 'Down Cruising Club', 'country' = 'United Kingdom', 'description' = 'RIGOLETTO (formerly Elkedor) moved from Fareham to Strangford in 2008', 'data_source' = 'VEGADB', 'status' = 'imported', 'mailing_list' = 'No', 'hide_record' = 'Yes', 'owner_imported' = 'Michael McDermott', 'email_imported' = 'mjmcd1@test.com', 'approved' = 'no'
What am I doing wrong?
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
- The topic ‘CSV import problems’ is closed to new replies.