Do you mean “--hiveConf” (two dash) , instead of -hiveconf (one dash)

Thanks.

Zhan Zhang

On Mar 6, 2015, at 4:20 AM, James <alcaid1...@gmail.com> wrote:

> Hello, 
> 
> I want to execute a hql script through `spark-sql` command, my script 
> contains: 
> 
> ```
> ALTER TABLE xxx 
> DROP PARTITION (date_key = ${hiveconf:CUR_DATE});
> ```
> 
> when I execute 
> 
> ```
> spark-sql -f script.hql -hiveconf CUR_DATE=20150119
> ```
> 
> It throws an error like 
> ```
> cannot recognize input near '$' '{' 'hiveconf' in constant
> ```
> 
> I have try on hive and it works. Thus how could I pass a parameter like date 
> to a hql script?
> 
> Alcaid


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org

Reply via email to