Thanks Maciek !!!!! Another issue is I am using *Hive 0.13.0.2.1.7.0-784 * and *Beeline version 0.13.0.2.1.7.0-784 by Apache Hive.*
I am able to execute: *hive -e "use db_test; show tables"* But while executing same in beeline gives error: *beeline -u "<details>" -e **"use db_test; show tables"* * OR* *beeline -u "<details>" -e **"use db_test \; show tables"* *Error:*ParseException line 1:13 missing EOF at ''\ ;'' near 'db_test' (state=42000,code=40000) On Wed, Jan 13, 2016 at 10:14 PM, matshyeq <matsh...@gmail.com> wrote: > 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". >> > >