Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hive JDBC drivers support to execute multiple SQL Statements

Hive JDBC drivers support to execute multiple SQL Statements

New Contributor

Hi,

 

I have written a java program to execute SQL statements on hive using Cloudera hive JDBC driver. When I try to execute multiple SQL statements separated by a semicolon, driver throwing an error - Error while compiling statement: FAILED: ParseException line 1:36 cannot recognize input near ';' '<EOF>' '<EOF>' in table source. Is it possible to execute multiple SQL statements using Hive JDBC driver.

5 REPLIES 5

Re: Hive JDBC drivers support to execute multiple SQL Statements

Guru
This is not supported, you just need to call execute() for each query.
Highlighted

Re: Hive JDBC drivers support to execute multiple SQL Statements

New Contributor

Hi EricL,

 

Is there any plan in feature to support this feature?

Re: Hive JDBC drivers support to execute multiple SQL Statements

Guru
Sorry, I am not aware of this.

Is there any particular use case that you need to rely on this feature?

Re: Hive JDBC drivers support to execute multiple SQL Statements

New Contributor

We have a client interface to interact with hadoop hive through hive jdbc drivers. Through client interface, it is possible to connect to dirrerent databases like db2, teradata, hadoop and aster. In interface, customer can run multiple queries seperated by "," when it is connected to db2 or teradata but unable to run multiple queries when it is connected to hadoop hive. The customer wants this feature in our client interface.

Re: Hive JDBC drivers support to execute multiple SQL Statements

Guru
Let me check this internally for you. Will get back to you later on this.