我正在尝试创建一个csv hive表(使用hive CLI)到S3。
create external table hello (
name INT)
stored as csv
location 's3://bucket/myfolder;
= =比;错误语义异常Unrecognized file format in stored as clause 'CSV'
我删除了EXTERNAL
create table hello (
name INT)
stored as csv
location 's3://bucket/myfolder;
= =比;相同的错误语义异常Unrecognized file format in stored as clause 'CSV'
知道我正在使用Apache Hive + Apache Hadoop(我安装它是因为Hive需要一些Hadoop二进制文件)。
你有什么好主意吗?谢谢
CSV不是有效的文件类型。试试这个:
create external table hello (
name INT)
row format delimited
fields terminated by ','
stored as textfile
location 's3://bucket/myfolder';
或
create external table hello (
name INT)
row format serde 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
stored as textfile
location 's3://bucket/myfolder';