You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Pierre Villard (Jira)" <ji...@apache.org> on 2021/02/19 21:17:00 UTC

[jira] [Created] (NIFI-8243) Optional removal of fields with UpdateRecord

Pierre Villard created NIFI-8243:
------------------------------------

             Summary: Optional removal of fields with UpdateRecord
                 Key: NIFI-8243
                 URL: https://issues.apache.org/jira/browse/NIFI-8243
             Project: Apache NiFi
          Issue Type: Improvement
          Components: Extensions
            Reporter: Pierre Villard


Improve the UpdateRecord processor for field removal:
 * *Improvement 1* - In case, "Replacement Value Strategy" is set to "Record Path Value", then add a boolean property that would default to false and if true would remove the fields provided in the dynamic properties after the updates have been done. This would provide the capability to move fields in the schema.
 * *Improvement 2* - In case, "Replacement Value Strategy" is set to "Record Path Value", allow the users to set the empty string as the value of the paths provided through dynamic properties. This would provide the capability to remove fields.

Example - *input*

 
{code:java}
{
  "foo": "value",
  "record": {
    "subrecord": {
      "key": "value"
    }
  }
}{code}
*Improvement 1*

*Dynamic property: /subrecord => /record/subrecord*

*Additional property set to true*

*Output*
{code:java}
{
  "foo": "value",
  "subrecord": {
    "key": "value"
  }
}{code}
 

*Improvement 2*

*Dynamic property: /record => <empty string>*

*Output*
{code:java}
{
  "foo": "value"
}{code}
 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)