How can an application connect to Hive run as a server?



How can an application connect to Hive run as a server?..

Answer / Sachin Kant Siddharth

To connect an application to Hive running as a server, you need to use the JDBC driver provided by Hive. Here's a step-by-step guide: 1. Download and add the Hive JAR files to your project's classpath. 2. Write a Java code snippet that creates a connection using the following URL format: jdbc:hive2://<HiveServer2 host>:<port>/<database>;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2 3. You can now execute HiveQL queries using the established connection.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apache Hive Interview Questions

What is the difference between Hive CLI and Beeline?

1 Answers  


What is the difference between sort by and order by in hive?

1 Answers  


Can we run unix shell commands from the hive? Give example?

1 Answers  


What is CTAS Table in Hive?

1 Answers  


When we are using queries instead of scripting?

0 Answers  


Specify the different types of tables accessible in hive?

1 Answers  


What will be the output of cast ('XYZ' as INT)?

1 Answers  


Give some points of hive for hadoop ?

1 Answers  


Hive for Hadoop - Give some points?

1 Answers  


Difference between external table and internal table in HIVE ?

1 Answers  


What are the types of hive ddl commands?

1 Answers  


When to choose "External Table" in Hive?

0 Answers  


Categories