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.

SelectHiveQL throwing an error after performing a Insert-Select

SelectHiveQL throwing an error after performing a Insert-Select

Hi,

I am Inserting data into hive table from some other hive table using SelectHiveQL. Although, it successfully inserts the data after insertion SelectHiveQL throws below mentioned error:

org.apache.nifi.processor.exception.ProcessException: java.sql.SQLException: The query did not generate a result set! at org.apache.nifi.processors.hive.SelectHiveQL$1.process(SelectHiveQL.java:179) ~[nifi-hive-processors-1.1.0.2.1.2.0-10.jar:1.1.0.2.1.2.0-10] at org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2329) ~[na:na] at org.apache.nifi.processors.hive.SelectHiveQL.onTrigger(SelectHiveQL.java:164) ~[nifi-hive-processors-1.1.0.2.1.2.0-10.jar:1.1.0.2.1.2.0-10] at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) [nifi-api-1.1.0.2.1.2.0-10.jar:1.1.0.2.1.2.0-10] at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1099) [nifi-framework-core-1.1.0.2.1.2.0-10.jar:1.1.0.2.1.2.0-10] at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136) [nifi-framework-core-1.1.0.2.1.2.0-10.jar:1.1.0.2.1.2.0-10] at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) [nifi-framework-core-1.1.0.2.1.2.0-10.jar:1.1.0.2.1.2.0-10] at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132) [nifi-framework-core-1.1.0.2.1.2.0-10.jar:1.1.0.2.1.2.0-10] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_121] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_121]

I have written the following query in SelectHiveQL:

Insert into Table1 Select * from Table2;

Both Table1 and Table2 are in Hive.

1 REPLY 1
Highlighted

Re: SelectHiveQL throwing an error after performing a Insert-Select

Super Guru

SelectHiveQL is for queries that return a result set (such as a SELECT query). You have an INSERT statement, so you'll want to use PutHiveQL rather than SelectHiveQL.

Don't have an account?
Coming from Hortonworks? Activate your account here