Hi,

It still don't work.
Is there any success instruction about how to pass a date to a hql script?

Alcaid

2015-03-07 2:43 GMT+08:00 Zhan Zhang <zzh...@hortonworks.com>:

> 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
>
>

Reply via email to