Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to use beeline -f filename

Tags:

hive

hiveql

I am unable to run

beeline -f file_queries.hql

Error:
$ beeline -f edip_validations_hql.hql
beeline> {My Query}
No current connection

Note: I am on Kerberos so I have done kinit. Usually for beeline to work I have to do a

 !connect jdbc:hive2://XX.xxxx.xx.org:10000/default;principal=hive/[email protected]

However I am not clear how this would work. Any pointers would help.

like image 466
Taposh DuttaRoy Avatar asked Feb 06 '15 06:02

Taposh DuttaRoy


People also ask

How do I open a beeline file?

To start Beeline, run beeline shell which is located at $HIVE_HOME/bin directory. This prompts you to an interactive Hive Beeline CLI Shell where you can run HiveQL commands. You can enter !


2 Answers

All -

I found out how to do this.

 beeline -u 'jdbc:hive2://server.domain.<>.com:10000/default;principal=hive/[email protected]' -f filename.hql
like image 72
Taposh DuttaRoy Avatar answered Oct 21 '22 03:10

Taposh DuttaRoy


I just found out one way to run File in Hive Beeline.

Just Go to the Hive beeline

//use !run to run script File
beeline> !run ///C:/ScriptFile

Above Method surely helpful to run file beeline after connect to the hive server.

like image 42
Mister X Avatar answered Oct 21 '22 04:10

Mister X