0
votes

I have csv file with column header inside the file. e.g.

Column1 Column2 Column3
value1 value2 value 3
value1 value2 value 3
value1 value2 value 3
value1 value2 value 3

Now i want to create hive table using this header inside and then load the entire table without the header line into the table. Can anyone please suggest what approach should be followed in this case.

2

2 Answers

0
votes

You can specify

tblproperties ("skip.header.line.count"="1");

see this SO question (Hive External table-CSV File- Header row)

-1
votes

You should remove the header line before loading data into HDFS, no other options here.