Hive 外部表-CSV 文件-标题行 [英] Hive External table-CSV File- Header row
本文介绍了Hive 外部表-CSV 文件-标题行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
下面是我创建的 hive 表:
Below is the hive table i have created:
CREATE EXTERNAL TABLE Activity (
column1 type, </br>
column2 type
)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
LOCATION '/exttable/';
在我的 HDFS 位置/exttable 中,我有很多 CSV 文件,每个 CSV 文件还包含标题行.当我进行选择查询时,结果也包含标题行.
In my HDFS location /exttable, i have lot of CSV files and each CSV file also contain the header row. When i am doing select queries, the result contains the header row as well.
在 HIVE 中有什么方法可以忽略标题行或第一行吗?
Is there any way in HIVE where we can ignore the header row or first line ?
推荐答案
您现在可以在 hive 0.13.0 中跳过标头计数.
you can now skip the header count in hive 0.13.0.
tblproperties ("skip.header.line.count"="1");
这篇关于Hive 外部表-CSV 文件-标题行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文