Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

puthiveql error

avatar
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

avatar
Expert Contributor

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

avatar
Expert Contributor

@Matt Clarke can you help me here please

avatar
Super Mentor

@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

avatar
Expert Contributor

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.

avatar
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

avatar
Expert Contributor

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.

avatar
Expert Contributor

@Shawn Weeks

I have found the solution.

It is with the principal which is has permission validation.

Thanks for your help