无法使用beeline -f filename

Tap*_*Roy 5 hive hiveql

我无法跑

beeline -f file_queries.hql

Error:
$ beeline -f edip_validations_hql.hql
beeline> {My Query}
No current connection
Run Code Online (Sandbox Code Playgroud)

注意:我在Kerberos上,所以我做了kinit.通常直线上班,我必须做

 !connect jdbc:hive2://XX.xxxx.xx.org:10000/default;principal=hive/somedomain.org@MYXXX-DEV.XX.ORG
Run Code Online (Sandbox Code Playgroud)

但是我不清楚这是如何工作的.任何指针都会有所帮助.

Tap*_*Roy 9

全部 -

我发现了如何做到这一点.

 beeline -u 'jdbc:hive2://server.domain.<>.com:10000/default;principal=hive/server.domain.com@SERVER.DOMAIN.COM' -f filename.hql
Run Code Online (Sandbox Code Playgroud)


VM *_* MP 5

我刚刚找到了一种在 Hive Beeline 中运行 File 的方法。

只需前往蜂巢直线

//use !run to run script File
beeline> !run ///C:/ScriptFile
Run Code Online (Sandbox Code Playgroud)

上述方法对于连接到 hive 服务器后运行 file beeline 肯定有帮助。


小智 0

您应该能够在查询之前将该连接字符串添加到 .hql 文件中。但我还没有看到在连接字符串中传递密钥表的方法,并且通用配置单元主体将要求用户/密码。目前,我仍在使用 hive -f ,它与我现有的 kinit 一起使用。希望您找到另一个解决方案,因为目前 beeline -f 在安全集群上对我来说毫无用处。