Support Questions
Find answers, ask questions, and share your expertise
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


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( ~[nifi-hive-processors-] at org.apache.nifi.controller.repository.StandardProcessSession.write( ~[na:na] at org.apache.nifi.processors.hive.SelectHiveQL.onTrigger( ~[nifi-hive-processors-] at org.apache.nifi.processor.AbstractProcessor.onTrigger( [nifi-api-] at org.apache.nifi.controller.StandardProcessorNode.onTrigger( [nifi-framework-core-] at [nifi-framework-core-] at [nifi-framework-core-] at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$ [nifi-framework-core-] at java.util.concurrent.Executors$ [na:1.8.0_121] at java.util.concurrent.FutureTask.runAndReset( [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.


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