Support Questions
Find answers, ask questions, and share your expertise

puthiveql error

Solved Go to solution

puthiveql error

Expert Contributor

Hi,

I am getting error when inserting into hive tables using puthiveql processor.


Scenario:

I have a file, which I managed to convert in to INSERT INTO statement ( I copied it to a location to see if any syntax mistakes are there, found no errors).

Assume: INSERT INTO mytable values ('a', '', 'c', '', 'd');

when I send the above to puthive ql, I am getting the below error.

23496-puthiveqlerror.jpg

I thought it is because of the ";" in the end of insert into statement, so I removed it, then I am getting the below error

Please help me.

Thank you.

23495-puthiveqlerrorwithoutsemicolon.jpg


puthiveqlerror.jpg
1 ACCEPTED SOLUTION

Accepted Solutions

Re: puthiveql error

Rising Star

There has to be an error in your sql statement. The insert statement is in your flowfile correct? Can you create a dummy text file with insert statements that demonstrates the error. If not then there has to be a syntax error in the actual insert statement. I'll also need a screenshot of your PutHiveQL configuration.

View solution in original post

6 REPLIES 6

Re: puthiveql error

Expert Contributor

@Matt Clarke can you help me here please

Re: puthiveql error

Master Guru

@Hadoop User

I am unfortunately not a Hive or Hadoop Guru. Both errors above are being thrown by the Hive and Hadoop client libraries that these processors use and not by NiFi itself.

Hopefully the above log lines are followed by full stack traces in the nifi-app.log. If not, try enabling DEBUG logging to see fi you can get a stack trace output. That stack trace may provide the necessary details to help diagnose what is causing the issue.

Hopefully a Hive or Hadoop Guru will then be able to provide some assistance here.

I also suggest providing the details for the HiveConnectionPool controller service you setup that is being used by this PutHiveQl processor.

Thanks,

Matt

Re: puthiveql error

Rising Star

There has to be an error in your sql statement. The insert statement is in your flowfile correct? Can you create a dummy text file with insert statements that demonstrates the error. If not then there has to be a syntax error in the actual insert statement. I'll also need a screenshot of your PutHiveQL configuration.

View solution in original post

Re: puthiveql error

Expert Contributor

@Shawn Weeks

I have created a dummy test file with insert statements, works fine, data is inserted in to the table.

nothing new in the configurations of puthiveQL, I just selected hive configuration pool and gave the database connection url.

Thanks

Re: puthiveql error

Rising Star

If it works with a test file then it has to be a syntax error in your real data. Unfortunately without seeing the real statements there isn't anyway for us to troubleshoot. I'd try running some of the sql statements from the flowfile in beeline and see if you get a better error.

Re: puthiveql error

Expert Contributor

@Shawn Weeks

I have found the solution.

It is with the principal which is has permission validation.

Thanks for your help