Reply
New Contributor
Posts: 1
Registered: ‎07-10-2014

How to connect node.js application to Impala?

Is there a recommended way to connect a Node.js application to Impala?   I cannot find and drivers in npmjs for it.   

 

 

thanks,

Ian

Posts: 1,896
Kudos: 433
Solutions: 303
Registered: ‎07-31-2013

Re: How to connect node.js application to Impala?

If thrift is supported for node.js, you can try implementing a HS2 spec client to then connect to any ImpalaD's JDBC port via your node.js program.

The thrift interface file can be found at https://github.com/cloudera/hive/blob/cdh5.1.0-release/service/if/TCLIService.thrift
New Contributor
Posts: 1
Registered: ‎10-06-2015

Re: How to connect node.js application to Impala?

Hello,

 

We are now in 2015, is there any update from Cloudera about this topic ?

Maybe a nodejs module is on its way ?

 

Thanks

New Contributor
Posts: 2
Registered: ‎12-13-2015

Re: How to connect node.js application to Impala?

Hi,

 

I'm also looking for the same. If anyone found a solution, please provide a sample application to read data from impala in nodejs app.

Highlighted
Cloudera Employee
Posts: 10
Registered: ‎12-08-2015

Re: How to connect node.js application to Impala?

I've never used node.js before but there seem to be two options:

 

1) As Harsh suggested, thrift can be used to generate an impala client. There is a generic thrift example is at https://thrift.apache.org/tutorial/nodejs . The best impala specific example I could find is a python test case but it should be very similar to what would be done in js https://github.com/cloudera/Impala/blob/cdh5-2.3.0_5.5.0/tests/hs2/test_fetch.py#L127 .

 

2) An easier option may be to use https://www.npmjs.com/package/jdbchttp://www.cloudera.com/content/www/en-us/downloads/connectors/impala/jdbc/2-5-29.html .

 

 

New Contributor
Posts: 2
Registered: ‎12-13-2015

Re: How to connect node.js application to Impala?

Thanks for your response!

 

I used ODBC module read data from Impala and it's working fine.

New Contributor
Posts: 2
Registered: ‎02-06-2016

Re: How to connect node.js application to Impala?

[ Edited ]

I've created a node module (Impala Client) but haven't published yet. I will make some changes then publish it soon. If you need it as module immediately mail me but if you only need the code that gathers data from HDFS using Impala just mimic the code in the test folder. The code in the test.js file is enough, I have tested it and it's working fine.

https://github.com/ufukomer/node-thrift-impala

New Contributor
Posts: 2
Registered: ‎02-06-2016

Re: How to connect node.js application to Impala?

I've finally released Node Client module for Impala. It's very simple and practical. Check it out:

 

https://github.com/ufukomer/node-impala

Announcements

Our community is getting a little larger. And a lot better.


Learn More about the Cloudera and Hortonworks community merger planned for late July and early August.