golang使用odbc链接hive
安装odbc
yum install unixODBC
yum install unixODBC-devel
## mysql driver require
yum install mysql-connector-odbc
## hive driver require
## https://cwiki.apache.org/confluence/display/Hive/HiveODBC
## 官方说不提供hive odbc driver libodbchive.so
此处说明: https://cwiki.apache.org/confluence/display/Hive/HiveODBC
There is no ODBC driver available for HiveServer2 as part of Apache Hive. There are third party ODBC drivers available from different vendors, and most of them seem to be free.
找到了一个Cloudera公司的hiveodbc驱动,地址:
https://www.cloudera.com/downloads/connectors/hive/odbc/2-5-12.html
下载ClouderaHiveODBC-2.5.20.1006-1.el7.x86_64.rpm并安装
$ rpm -ivh ClouderaHiveODBC-

本文介绍了如何在Golang中使用ODBC连接到Hive。首先,详细讲解了安装Cloudera的Hive ODBC驱动,并提供了配置参考链接。接着,通过isql进行测试验证连接。然后,展示了使用gohive库实现与Hive的连接,并列出了解决在连接过程中遇到的问题和相应的解决方案。

2309

被折叠的 条评论
为什么被折叠?



