0

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.

Bhagwant Bhobe
  • 81
  • 4
  • 11
  • 1
    possible duplicate of [Hive External table-CSV File- Header row](http://stackoverflow.com/questions/16457267/hive-external-table-csv-file-header-row) – Sean Owen Feb 02 '14 at 18:50

2 Answers2

0

You can specify

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

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

Mike Pone
  • 18,705
  • 13
  • 53
  • 68
-1

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

Evgeny Benediktov
  • 1,389
  • 1
  • 10
  • 13