Try *--hivevar **name=value*
works for hive and should work for beeline too:
https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-Beeline–NewCommandLineShell
<https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-Beeline%E2%80%93NewCommandLineShell>

Thank you,
Kind Regards
~Maciek

On 13 January 2016 at 12:43, Trainee Bingo <trainee1...@gmail.com> wrote:

> Hi All,
>
> Hope all are enjoying working in hive !!!
>
> I am having one question regarding hive and beeline:
>
> I am passing parameters to hive script using "-d".
>     Eg: *hive -d table_name -f emp.hql*
>
> *     emp.hql:*
>         CREATE EXTERNAL TABLE ${table_name}
>
>             (
>
>                   ID STRING,
>
>                   NAME STRING
>
>              ) ..............
>
>
> It works perfectly fine.
>
>
> But when I switch to beeline, beeline doesn't support "-d". Is there any
> way so that beeline accepts parameters in form of "-d".
>

Reply via email to