好吧,我有一些關於加載MySQL數據到蜂巢2的問題,並不知道如何指定分隔符,我嘗試了僕役時間,但什麼都沒有。這裏下面配置單元加載數據:如何指定文件列分隔符和動態分區列?
是蜂巢表,id
是分區列,
0: jdbc:hive2://localhost/> desc test;
+-----------+------------+----------+
| col_name | data_type | comment |
+-----------+------------+----------+
| a | string | |
| id | int | |
+-----------+------------+----------+
當我執行
load data local inpath 'file:///root/test' into table test partition (id=1);
它說:
Invalid path ''file:///root/test'': No files matching path file
,但它做存在。
我想動態通過指定的文件分割,所以我添加了非常列到文件中是這樣的:
[email protected]<namenode|~>:#cat /root/test
a,1
b,2
但它也失敗了,文件說一無所知,我猜它不」現在支持。 劑量有人有一些想法嗎?任何幫助將不勝感激!
你確定該文件在HDFS中嗎? – shazin