我的 csv 文件如下所示:
"SMTEX","GSN","KOF",1.71,"2014-01-06 13:32:21"
"NXEX","JS","FIM",1.99,"2014-01-14 09:52:11"
"SMTEX","WT","VUX",0.82,"2014-01-23 02:22:37"
我通过以下方式将此数据导入配置单元:
hive -e 'CREATE TABLE playground.stuff (
ex_id STRING,
game_id STRING,
user_id STRING,
price FLOAT,
date TIMESTAMP) ROW FORMAT DELIMITED FIELDS TERMINATED BY ",";'
hive -e 'LOAD DATA LOCAL INPATH "/path/to/csv" INTO TABLE playground.stuff;'
然而,时间戳似乎没有被解析。我得到的输出是:
hive> select * from stuff;
OK
"SMTEX" "GSN" "KOF" 1.71 NULL
"NXEX" "JS" "FIM" 1.99 NULL
"SMTEX" "WT" "VUX" 0.82 NULL
我究竟做错了什么?