我有同樣的經歷。首先,我從oracle導入1個表格到hadoop 2.7.1,然後通過鑽取查詢。這是我的插件配置通過Web界面設置:
{
"type": "file",
"enabled": true,
"connection": "hdfs://192.168.19.128:8020",
"workspaces": {
"hdf": {
"location": "/user/hdf/my_data/",
"writable": false,
"defaultInputFormat": "csv"
},
"tmp": {
"location": "/tmp",
"writable": true,
"defaultInputFormat": null
}
},
"formats": {
"csv": {
"type": "text",
"extensions": [
"csv"
],
"delimiter": ","
}
}
}
然後,在鑽CLI,這樣的查詢:
USE hdfs.hdf
SELECT * FROM part-m-00000
此外,在Hadoop中的文件系統,當我的貓「的內容部分 - m-00000',控制檯上印有以下格式:
2015-11-07 17:45:40.0,6,8
2014-10-02 12:25:20.0,10,1