[
https://issues.apache.org/jira/browse/NIFI-4228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16174827#comment-16174827
]
ASF subversion and git services commented on NIFI-4228:
-------------------------------------------------------
Commit 7b07eb0577d17132374203627bd759771fc62868 in nifi's branch
refs/heads/master from [~ijokarumawak]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=7b07eb0 ]
NIFI-4228: Fix PutDatabaseRecord to ignore unmatched fields
- Unmatched fields were ignored, but the number of prepared statement
place holders were not correct.
- Added unit test code for generateUpdate.
- Added unit test code with "Ignore Unmatched Columns".
Signed-off-by: Pierre Villard <[email protected]>
This closes #2165.
> PutDatabaseRecord Processor fail to support 'Ignore Unmatched Fields'
> ---------------------------------------------------------------------
>
> Key: NIFI-4228
> URL: https://issues.apache.org/jira/browse/NIFI-4228
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Affects Versions: 1.3.0
> Environment: in NIFI 1.3.0
> Reporter: ben
> Assignee: Koji Kawamura
> Priority: Minor
> Labels: easyfix
> Fix For: 1.4.0
>
>
> the new PutDatabaseRecord processor currently has a bug that fails to support
> the 'Ignore Unmatched Fields' of property 'Unmatched Field Behavior', when
> the source AVRO records have fields that don't exist in the insertion
> destination table and the property 'Unmatched Field Behavior' is set to
> 'Ignore unmatched fields', then it will result in error instead of ignoring
> the fields in the source.
> The fix is actually quite easy, in line 785 of file
> PutDatabaseRecord.java(method generateInsert), replace 'fieldCount' with
> 'includedColumns.size()'.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)