Member since
09-07-2024
3
Posts
2
Kudos Received
0
Solutions
09-09-2024
11:28 PM
Hi Smruti, Thanks for your reply. I've used the above snippet. PFB Error
... View more
09-08-2024
01:44 AM
1 Kudo
Adding message Tags to reach better view to get answer
... View more
- Tags:
- apache hive
09-07-2024
10:25 AM
1 Kudo
Hi Team,
Good Day..
I'm beginner in Node.JS trying to connect Hive DB using
hive-driver npm from Node.JS code.
I couldn't establish the db connection.
Any help would be much appreciated...
Note: Our Hive DB has ssl connection, jks trust store password, HTTP protocol , httppath=cliservice
NODE.JS SAMPLE CODE:
client.connect( { host: 'jdbc:hive2://abc.com:2181/dev_db;ssl=true;sslTrustStore=/etc/hive-jks/hivetrust.jks;trustStorePassword=pro@!23;transportMode=http;httpPath=cliservice;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2', port: 2181 }, new hive.connections.HttpConnection(), new hive.auth.PlainHttpAuthentication({ username: 'username', password: 'password' }) ).then(async client => {
console.log(client);
const session = await client.openSession({ client_protocol: TCLIService_types.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10 });
}).catch(error => { console.log(error); });
when I console.log client It's printing but I tried to open client.open session I've been facing issues
Kindly check the host url string which I've given right or not.
Could you please help on this issue.
PFB Error.
Thank you..
... View more
Labels:
- Labels:
-
Apache Hive