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.

NiFi PutSQL exception.

NiFi PutSQL exception.

I am getting following exception with PutSQL processor "2017-04-04 20:18:00,746 ERROR [Timer-Driven Process Thread-10] o.apache.nifi.processors.standard.PutSQL PutSQL[id=aff94ebf-739d-1936-ffff-ffff9e38bbdf] Failed to update database due to a failed batch update. There were a total of 1 FlowFiles that failed, 0 that succeeded, and 0 that were not execute and will be routed to retry;"

The same sql if I run through command line works fine. There are no additional details for the exception.

10 REPLIES 10

Re: NiFi PutSQL exception.

Can you please share the details of what was being put? Perhaps explain/show what the content of the failed flow file was?

Highlighted

Re: NiFi PutSQL exception.

@jwitt

PutSQL :

Insert into PCSOR (policy_num, prem_amount, LOB, AdminSystem, Name, DOB, Phone, Address) values ( '123456','2000.00','PC','PC SOR','John Smith','1/1/1970','212-010-2345','316 Lincoln Rd. Brooklyn, NY 11225') ON DUPLICATE KEY UPDATE Address='316 Lincoln Rd. Brooklyn, NY 11225';

Sample Flow:

14395-screen-shot-2017-04-04-at-43138-pm.gif

Connection Pool.

14396-screen-shot-2017-04-04-at-43208-pm.gif

Re: NiFi PutSQL exception.

are any updates working or is the only one being tried?

Re: NiFi PutSQL exception.

thats the only one tried , let me try simple insert.

Re: NiFi PutSQL exception.

@jwitt tried the executeSQL which is working fine.

Re: NiFi PutSQL exception.

Super Guru

please post full exception logs, SQL string, flow file, attributes. is your db connection working?

for further debugging: https://dzone.com/articles/finding-nifi-errors

Re: NiFi PutSQL exception.

Super Collaborator

@milind pandit : Can you try the same without the ; (semicolon) at the end. Not sure though.

Re: NiFi PutSQL exception.

same result.

Re: NiFi PutSQL exception.

Super Collaborator

is the data type of DOB date? can you try '1970-01-01'

Don't have an account?
Coming from Hortonworks? Activate your account here