hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trainee Bingo <trainee1...@gmail.com>
Subject Re: Passing parameters to Beeline
Date Thu, 14 Jan 2016 10:40:47 GMT
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 <matshyeq@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 <trainee1009@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".
>>
>
>

Mime
View raw message