Github user MikeThomsen commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2560#discussion_r175850266
--- Diff:
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/PutMongo.java
---
@@ -196,6 +237,33 @@ public void onTrigger(final ProcessContext context,
final ProcessSession session
}
}
+ private void removeUpdateKeys(String updateKeyParam, Map doc) {
+ String[] parts = updateKeyParam.split(",[\\s]*");
+ for (String part : parts) {
+ if (part.contains(".")) {
--- End diff --
Yes. The only time it wouldn't apply is if a user wanted to remove a field
like they misnamed the `username` field as `yusername`. They can fix that with:
```
{
"yusername": "....",
"$set": {
"username": ".....",
},
"$unset": {
"yusername": 1
}
}
```
---