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 Script Unable to Insert int target

Solved Go to solution
Highlighted

Re: Hive Script Unable to Insert int target

Contributor

Cool ! Please accept the answer.

You can execute below command before your select query to get column headers.

<code>set hive.cli.print.header=true;

Re: Hive Script Unable to Insert int target

New Contributor

Hi rtrivedi,

I added the additional code as suggested, but I get the following error:

org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 2:0 cannot recognize input near 'set' 'hive' '.' in statement

Re: Hive Script Unable to Insert int target

New Contributor

Hi rtrivedi

I added set hive.cli.print.header=true;

However, I getting the following error:

org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 2:0 cannot recognize input near 'set' 'hive' '.' in statement

Re: Hive Script Unable to Insert int target

New Contributor

Hi rtrivedi,

I added the additional code you suggested, however I'm getting the following error:

org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 2:0 cannot recognize input near 'set' 'hive' '.' in statement

Re: Hive Script Unable to Insert int target

New Contributor

Hi rtrivedi,

I added the additional code as suggested, but I get the following error:

org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 2:0 cannot recognize input near 'set' 'hive' '.' in statement