у вас есть пустая строка в CSV после заголовка - перед данными (удалите его).
вам нужно сформировать два оператора для загрузки данных в две таблицы
Чтобы загрузить данные, вы должны запустить MySQL с
mysql -u root -p --local-infile=1
Код Foll работает
load data local infile '/home/infiniti/Downloads/careerbuilder_dataanalytics.csv' into table dataanalyst_ncr
fields terminated by ','
lines terminated by '\n'
ignore 1 lines
(@col1, @col2, @col3, @col4, @col5, @col6)
set
job_title = @col3, company_name = @col1, job_desc = @col2, job_id = 0, links=@col4
mysql> create table dataanalyst_ncr ( job_title text, company_name text, links text, job_desc text, job_id int primary key auto_increment, last_updated_on timestamp) ;
Query OK, 0 rows affected (0.58 sec)
mysql> desc dataanalyst_ncr;
+-----------------+-----------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+-----------+------+-----+---------+----------------+
| job_title | text | YES | | NULL | |
| company_name | text | YES | | NULL | |
| links | text | YES | | NULL | |
| job_desc | text | YES | | NULL | |
| job_id | int(11) | NO | PRI | NULL | auto_increment |
| last_updated_on | timestamp | YES | | NULL | |
+-----------------+-----------+------+-----+---------+----------------+
6 rows in set (0.06 sec)
mysql> load data local infile '/home/infiniti/Downloads/careerbuilder_dataanalytics.csv' into table dataanalyst_ncr
-> fields terminated by ','
-> lines terminated by '\n'
-> ignore 1 lines
-> (@col1, @col2, @col3, @col4, @col5, @col6)
-> set
-> job_title = @col3, company_name = @col1, job_desc = @col2, job_id = 0, links=@col4;
Query OK, 1 row affected (0.14 sec)
Records: 1 Deleted: 0 Skipped: 0 Warnings: 0
mysql> select * from dataanalyst_ncr;
+-----------------------------------+------------------+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+--------+-----------------+
| job_title | company_name | links | job_desc | job_id | last_updated_on |
+-----------------------------------+------------------+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+--------+-----------------+
| Manager Field Operations - India | Hilton Corporate | /jdp/manager -field-operations----india-j3r1tw77rcl1lzd7wxb | A national Procurement Manager Field Operations India will assist in the planning organization direction and control of the purchasing and sup... | 1 | NULL |
+-----------------------------------+------------------+-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+--------+-----------------+
1 row in set (0.00 sec)
mysql>
mysql>