Bulk CSV Import to Email Black list(mw_email_blacklist) table in DATABASE Error

pradeep sharma

Active Member
Dear @twisted19

I Have a huge list of Email Blacklist around 265K Records as import via Backend was very slow then i tried to upload it to directly into table myprefix_email_blacklist(i made my table empty to avoid any confilct)
i have a csv file with all fields set and with no error..
I tried to upload in via MYSQL Consol in command line ...

Code:
mysql> LOAD DATA LOCAL INFILE '/home/mailapp_email_blacklist.csv' INTO TABLE mailapp_email_blacklist FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' (email_id, subscriber_id, email, reason, date_added, last_updated);

I got This error
Code:
ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`dashboard01_zoikmail`.` mailapp_email_blacklist`, CONSTRAINT `fk_email_blacklist1` FOREIGN KEY (`subscriber_id`) REFERENCES `mailapp_l ist_subscriber` (`subscriber_id`) ON DELETE SET NULL ON UP)

How can i upload it directly to email blacklist table?? or any Command line Utility of call Import Command in CLI mode. or any best way to upload it in speedy manner..????

Does 'Queue Import' also Work in Importing to Email Blacklist..I find that it dont works!!

I recommend
if you can add this feature(Email-Blacklist Import via Command Line-queue-import) to next release!

My Support Pack is Expired.
We ll Upgrade our Support pack by this weekend as my Company Credit Card is Fully Exhausted and will be recharged by today evening or tomorrow morning.

Regards
 
Even i tried with 2 records file Still have same error
FYI: My CSV file have no Commas(,), no semi commas(;) no inverted quotes(" ") as it creates a problem in CSV import..
 
i read it all wrong, never mind the last reply.
I think you have only two options:
1) Split the big file into multiple smaller files and upload one by one.
2) Create a separate database table using myisam engine, with the same columns as email_blacklist table, then import in that table directly. After the import is done, using phpmyadmin, copy the records from the table into the email_blacklist table.
 
recently imported a larger BL
with this file's structure
via backend and cron import
all went well
(just delete the .txt to get a csv file)
you can fix your other format with any good txt editor and it should work fine
;)
 

Attachments

Last edited:
Back
Top