Created on 08-08-2017 01:50 AM - edited 08-17-2019 09:37 PM
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.
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.
Created 08-15-2017 03:19 PM
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.
Created 08-15-2017 02:26 PM
@Matt Clarke can you help me here please
Created 08-15-2017 02:39 PM
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
Created 08-15-2017 03:19 PM
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.
Created 08-15-2017 03:39 PM
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
Created 08-15-2017 05:24 PM
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.
Created 10-17-2017 02:19 PM
I have found the solution.
It is with the principal which is has permission validation.
Thanks for your help