How to Import Customer Records Into OTRS from CSV

Thanks to Mike Dent’s efforts and OTRS, we now know how a CSV file can be imported into the MySQL database directly. Here is the sample code:

mysql> load data infile '/tmp/otrs_test.txt' into table customer_user
fields terminated by '\t' lines terminated by '\r' (first_name,
last_name, address, postcode, phone1, email, customer_id, valid_id,
create_time, create_by, change_time, change_by, login);

Make sure to import all the required fields (that is, the ones that the database requires, see the table schema for details, >show table x;)

Posted under Freeware, MySQL, WebDev

This post was written by Content Curator on November 16, 2009

Tags: , , , , , , , , , , , , , , , , , , ,