You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/01/20 15:22:36 UTC

[GitHub] [nifi] markap14 commented on a change in pull request #4760: NIFI-8142 Add "on conflict do nothing" feature to PutDatabaseRecord

markap14 commented on a change in pull request #4760:
URL: https://github.com/apache/nifi/pull/4760#discussion_r561045998



##########
File path: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutDatabaseRecord.java
##########
@@ -301,13 +301,23 @@
             .name("put-db-record-max-batch-size")
             .displayName("Maximum Batch Size")
             .description("Specifies maximum batch size for INSERT and UPDATE statements. This parameter has no effect for other statements specified in 'Statement Type'."
-                            + " Zero means the batch size is not limited.")
+                    + " Zero means the batch size is not limited.")
             .defaultValue("0")
             .required(false)
             .addValidator(StandardValidators.NON_NEGATIVE_INTEGER_VALIDATOR)
             .expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
             .build();
 
+    static final PropertyDescriptor UPSERT_DO_NOTHING = new PropertyDescriptor.Builder()

Review comment:
       This feels odd to me. A property named "Upsert Do Nothing" I feel is confusing and misleading. It sounds like any upsert should be ignored and not acted upon. And in this case, it's not really upserts that are being ignored, but conflicting Inserts. What makes more sense to me is to add another option for the Statement Type: "INSERT_IGNORE" or something to that effect. This would be consistent with how it is done with PutKudu, also.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org