Aws Athena-跳过第一行创建外部表 [英] Aws Athena - Create external table skipping first row
本文介绍了Aws Athena-跳过第一行创建外部表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用Aws Athena在csv文件上创建一个外部表,代码如下,但行 TBLPROPERTIES( skip.header.line.count = 1)
不起作用:它不会跳过csv文件的第一行(标题)。
I'm trying to create an external table on csv files with Aws Athena with the code below but the line TBLPROPERTIES ("skip.header.line.count"="1")
doesn't work: it doesn't skip the first line (header) of the csv file.
CREATE EXTERNAL TABLE mytable
(
colA string,
colB int
)
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
WITH SERDEPROPERTIES (
'separatorChar' = ',',
'quoteChar' = '\"',
'escapeChar' = '\\'
)
STORED AS TEXTFILE
LOCATION 's3://mybucket/mylocation/'
TBLPROPERTIES (
"skip.header.line.count"="1")
有没有建议?
推荐答案
只是尝试了 skip.header.line.count = 1
,现在似乎工作正常。
Just tried the "skip.header.line.count"="1"
and seems to be working fine now.
这篇关于Aws Athena-跳过第一行创建外部表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文