Sure -- use -hiveconf X=Y, which allows your script to reference ${hiveconf:X}

On Feb 13, 2012, at 7:19 AM, "Wojciech Langiewicz" <wlangiew...@gmail.com> 
wrote:

> Hello,
> Is it possible (and how) to pass parameters to hive scripts from command 
> line?
> I would imagine something like:
> hive -f xyz.sql -p date='2012-02-13'
> which will substitute any occurrence of $date string in xyz.sql file.
> 
> I've searched wiki and list archive, but I didn't find any clues about 
> such feature.
> 
> If you know how to pass parameters to hive queries, please let me know.
> 
> --
> Wojciech Langiewicz

Reply via email to