Hive External table-CSV File- Header row

后端 未结 6 580
甜味超标
甜味超标 2020-12-24 08:06

Below is the hive table i have created:

CREATE EXTERNAL TABLE Activity (
  column1 type, 
column2 type ) ROW FORMAT DELIMITED FIELDS TERMINATED
6条回答
  •  旧时难觅i
    2020-12-24 08:53

    If your hive version doesn't support tblproperties ("skip.header.line.count"="1"), you can use below unix command to ignore the first line (column header) and then put it in HDFS.

     sed -n '2,$p' File_with_header.csv > File_with_No_header.csv
    

提交回复
热议问题