Hi Elliot, Alan, Furcy, thanks a lot for all the suggestions!
I've followed the links, and found a C++ library that looks like it could work for my use case: https://github.com/cloudera/hs2client/ <https://github.com/cloudera/hs2client/> Unfortunately, it does not seem like it is actively developed, so I guess the best way to talk to Hive would be to use Thrift directly. As far as I can tell, this would be a lot of effort, so I am not going to follow up on this right now. Thanks again for all your help! Furcy, I will forward your contact details to my customer. Best regards, Jakob > On 11. Nov 2017, at 10:25, Furcy Pin <[email protected]> wrote: > > Hi Jacob, > > Like Elliot and Alan said, cross-language exchanges seem to be handled using > Thrift, and there are some ODBC drivers too. > I didn't find a C library, even if they are python, ruby and nodeJS libraries. > > Also, when Googling, beware not to confuse HiveServer1 (sometimes refered to > as Thrift Server) and HiverServer2. > For instance this page seem to show some Python Clients for HiveServer1 > https://cwiki.apache.org/confluence/display/Hive/HiveClient#HiveClient-ThriftC++Client > > <https://cwiki.apache.org/confluence/display/Hive/HiveClient#HiveClient-ThriftC++Client> > > links for Python and Ruby clients are given at the end of this page: > https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2#SettingUpHiveServer2-PythonClientDriver > > <https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2#SettingUpHiveServer2-PythonClientDriver> > > But beware that the python client has been deprecated and you have to jump a > few links to find the most recent one. > > Anyway, I also wrote some productivity tool for Hive > (https://github.com/FurcyPin/flamy <https://github.com/FurcyPin/flamy>), > which is only a Command-Line-Interface > for now, but I am currently working on making a GUI with Scala Play + > ReactJS. > I believe it is hard to make a tool which is good for both PostgreSQL and > Hive, because despite being SQL-based, they have > different use-cases, different behaviors (Hive is generally much slower to > respond small queries) and different syntax. > > If you decide not to spend time on adding Hive integration to your project, > perhaps you could redirect the users > that made that feature request to me. I would be happy to discuss their need > with them, and for now, > this is a one man project and I am mostly looking for users, so my work will > remain free and open source. > > Regards, > > Furcy > > > > 2017-11-10 11:28 GMT+01:00 Jakob Egger <[email protected] > <mailto:[email protected]>>: > Hi! > > I'm the developer of a database client tool, and I've received a request to > add support for querying Apache Hive. > > (My tool lets the user execute SQL queries, and it allows browsing tables > etc.) > > As a first step of evaluating this suggestion, I'm trying to find out if > there is a convenient way to connect to Hive. > > From reading the documentation, it seems that the preferred way to connect > seems to be using the JDBC driver. Since my app is not written in Java, this > is probably not the way to go. Apart from that, I didn't find much on this > topic in the docs. > > I have a few questions: > > 1) What ways are there to connect to Apache Hive? > > 2) Is there a C client library? > > 3) Is there any documentation on the wire protocol that Hive uses for client > / server communication? > > I'd appreciate if someone who knows more about the project could point me in > the right direction! > > Best regards, > Jakob >
