我收到的是相同的CSV,但列顺序不同。 我的外部配置单元表在DDL脚本中使用与CSV列名称相同的名称定义。但似乎它没有按CSV列名称映射数据并“读取”该CSV文件。我以为会有什么方法可以做到吗?
drop table db.table;
CREATE EXTERNAL TABLE db.table(`id` string, `text` string, `command` string)
row format SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
WITH SERDEPROPERTIES ('separatorChar'=',', 'quoteChar'='"','escapeChar'='\\')
stored as textfile
location ' ..... '
tblproperties ("skip.header.line.count"="1");
这会有很大帮助。