Hive 无法使用直线-f文件名

Hive 无法使用直线-f文件名,hive,hiveql,Hive,Hiveql,我跑不了 beeline -f file_queries.hql Error: $ beeline -f edip_validations_hql.hql beeline> {My Query} No current connection 注意:我使用Kerberos,所以我已经完成了。通常,为了直接上班,我必须做一个 !connect jdbc:hive2://XX.xxxx.xx.org:10000/default;principal=hive/somedomain.org@MY

我跑不了

beeline -f file_queries.hql

Error:
$ beeline -f edip_validations_hql.hql
beeline> {My Query}
No current connection
注意:我使用Kerberos,所以我已经完成了。通常,为了直接上班,我必须做一个

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

然而,我不清楚这将如何工作。任何指针都会有所帮助。

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

所有-

我知道怎么做了

 beeline -u 'jdbc:hive2://server.domain.<>.com:10000/default;principal=hive/server.domain.com@SERVER.DOMAIN.COM' -f filename.hql
beeline-u'jdbc:hive2://server.domain..com:10000/default;主体=配置单元/server.domain。com@SERVER.DOMAIN.COM'-f filename.hql

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

去蜂巢直线

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

上述方法肯定有助于在连接到配置单元服务器后运行文件beeline。

这在EMR上有效:
beeline-u jdbc:hive2://hadoop@localhost:10000-f query.sql