mySql table structure is:
CREATE TABLE Demo_Sales ( id INT NOT NULL PRIMARY KEY, product_name VARCHAR(30), brand VARCHAR(20), cust_email VARCHAR(50), quantity INT);
and the csv file has a header:
Because id is INT, so the sqoop command fails. Is there a way to skip the header line in the csv file while using sqoop export into the mySQL table. Thanks
Why not skip the header line when you load the CSV into MySQL? Using IGNORE n LINES (n is lines to skip so for you it should be 1). Then sqoop export to Hive, HDFS,etc.
My csv file is present in HDFS, need to export that file to load data in mySql table. The csv file has header row, because of which int primary key constraint is violated. Need to know, if we can ignore lines while doing a sqoop export or the only option is to edit the csv and remove the header row from top. Thanks