Cannot use beeline -f filename

I can not start

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 did kinit. Usually for beeline to work I have to do

 !connect jdbc:hive2://XX.xxxx.xx.org:10000/default;principal=hive/somedomain.org@MYXXX-DEV.XX.ORG

However, I do not know how this will work. Any pointers will help.

+4
source share
3 answers

All -

I learned how to do it.

 beeline -u 'jdbc:hive2://server.domain.<>.com:10000/default;principal=hive/server.domain.com@SERVER.DOMAIN.COM' -f filename.hql
+6
source

I just found out how to run a file in Hive Beeline.

Just go to the beeline hive

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

The above method is certainly useful for starting a beeline file after connecting to the hive server.

+2
source

You must add this connection string to the .hql file before the request. But I did not see a way to pass keytab in the connection string, and the general principle of the hive will require a user / password. So far, I'm still using hive -f, which works with my existing kinit. I hope you find another solution, since now beeline -f is useless for me in a secure cluster.

0
source

All Articles