NIFI-8142 Add "on conflict do nothing" feature to PutDatabaseRecord#4760
NIFI-8142 Add "on conflict do nothing" feature to PutDatabaseRecord#4760Snorlaxa wants to merge 9 commits intoapache:mainfrom
Conversation
markap14
left a comment
There was a problem hiding this comment.
Thanks for the improvement! I do think this is a valuable feature to add. I do think the separation of this property from the Statement Type property is a bit confusing, though. I think it would make a lot more sense to just have an INSERT_IGNORE statement type, which would also be consistent with the Kudu processors. Also looks like this needs to be rebased.
| .expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES) | ||
| .build(); | ||
|
|
||
| static final PropertyDescriptor UPSERT_DO_NOTHING = new PropertyDescriptor.Builder() |
There was a problem hiding this 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.
There was a problem hiding this comment.
Thanks for your reply and sorry for making that misleading. "INSERT_IGNORE" is a good idea. I will try it later :D
|
I don't know why my push action cannot trigger any check. Maybe I should close this PR and create another one? |
Thank you for submitting a contribution to Apache NiFi.
Please provide a short description of the PR here:
Description of PR
Enables X functionality; fixes bug NIFI-YYYY.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
Has your PR been rebased against the latest commit within the target branch (typically
main)?Is your initial contribution a single, squashed commit? Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not
squashor use--forcewhen pushing to allow for clean monitoring of changes.For code changes:
mvn -Pcontrib-check clean installat the rootnififolder?LICENSEfile, including the mainLICENSEfile undernifi-assembly?NOTICEfile, including the mainNOTICEfile found undernifi-assembly?.displayNamein addition to .name (programmatic access) for each of the new properties?For documentation related changes:
Note:
Please ensure that once the PR is submitted, you check GitHub Actions CI for build issues and submit an update to your PR as soon as possible.