[
https://issues.apache.org/jira/browse/NIFI-3898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16012483#comment-16012483
]
yahor tsaryk edited comment on NIFI-3898 at 5/16/17 2:34 PM:
-------------------------------------------------------------
@Koji Kawamura
Thank you! I just tried it with `postgresql-42.1.1.jar` and I can confirm that
flow files with invalid content have being moved to the "Retry" relationship
successfully. I see that you can't to route invalid files to the "Failure"
relationship since driver's PSQLException is very general. I'll have to
implement my own retry workflow for routing such flow files to the "Failure"
queue.
Anyway, I think this ticket can be closed/resolved.
was (Author: egortsaryk9):
@Koji Kawamura
Thank you! I just tried it with `postgresql-42.1.1.jar` and I can confirm that
flow files with invalid content have being moved to the "Retry" relationship
successfully. I see that you can't to route invalid files to the "Failure"
relationship since driver's PSQLException is very general. I'll have to
implement my own retry workflow for routing such messages to the "Failure".
Anyway, I think this ticket can be closed/resolved.
> PutSql - flow files get stuck in incoming queue if there are incorrect INSERT
> statements in flow files
> ------------------------------------------------------------------------------------------------------
>
> Key: NIFI-3898
> URL: https://issues.apache.org/jira/browse/NIFI-3898
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 1.2.0
> Reporter: yahor tsaryk
> Labels: putsql
> Attachments: 6463044572292-data (flow file content), Controller
> Service.png, Flow Files Listing.png, nifi-app.log (REPORT),
> nifi-bootstrap.log (REPORT), nifi-user.log (REPORT), PutSql Properties.png,
> PutSql Scheduling.png, PutSql Settings.png, Screen Shot 2017-05-15 at
> 21.25.46.png, Screen Shot 2017-05-15 at 21.25.54.png, UI interface.png
>
>
> Hi everybody, I just updated to 1.2.0 version and I found that if incoming
> flow file for PutSql processor contains incorrect sql INSERT statement (such
> as
> INSERT INTO public.my_table(id, data)
> VALUES('220f27c5-ce2f-4ab4-8bdd-fc9187d36783', '
> '{"my_jsonb_data_field":"some data"}') ON CONFLICT DO NOTHING; - the
> statement contains redundant apostrophe character) the flow files just get
> stuck in the incoming queue, they haven't being directed to "Failure" queue.
> I don't use "Rollback On Failure" feature - it is set to false. "Support
> Fragmented Transactions" option is also set to false.
> Also I tried to set "Batch Size" value to 1 but result is the same as with
> default batch size value (100). (It fails with
> "java.lang.ArayIndexOutOfBoundsException")
> Shouldn't incoming flow files with incorrect/broken sql statements be
> directed to the "Failure" relationship automatically ? Current behavior
> reminds like "Rollback On Failure" feature is set to true, but I just want to
> filter out incorrect sql insert statements.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)