2016-12-30 88 views
0

我通過hiveq.sql腳本創建一個蜂巢外部表:如何將路徑從shell腳本傳遞給Hive外部表?

Create external table if not exists abc 
(
id string 
) 
Row format delimited 
fields terminated by '|' 
Stored as textfile 
LOCATION '${hiveconf:loc}/xyz/data'; 

但我正在逐漸例外下面,當我試圖用Shell腳本來執行它:

hive -hiveconf test_loc=/om/name/loc -f hiveq.sql 

例外:

IllegalArgumentException java.net.URISyntaxException: 
    Relative path in absolute URI: ${hiveconf:test_loc%7D/xyz/data 

請幫忙。

回答

0

錯字... :-)

loc比。 test_loc


${hiveconf:loc} 

-hiveconf test_loc 
相關問題