Mark Payne created NIFI-4270:
--------------------------------

             Summary: UpdateRecord should allow option of appending result to 
indicated field
                 Key: NIFI-4270
                 URL: https://issues.apache.org/jira/browse/NIFI-4270
             Project: Apache NiFi
          Issue Type: Improvement
          Components: Extensions
            Reporter: Mark Payne
            Assignee: Mark Payne


Currently, when UpdateRecord is configured, it is given a Record Path where the 
results should be placed and either a 'literal value' or a 'record path' of 
where to obtain the results. It then evaluates the results and replaces 
whatever is currently at the destination with the result. However, we should 
allow the user to option append those results to the destination instead. For 
example, if I have the following data:

{code}
{
  "id": "4",
  "table": {
    "name": "mytable",
    "columns": 8,
    "rows": 40283
  }
}
{code}

Then I should be able to use UpdateRecord to 'copy those fields from "table" to 
the root level by adding a property with the name "/" and the value "/table/*"

I want this to then yield the following:

{code}
{
  "id": "4",
  "table": {
    "name": "mytable",
    "columns": 8,
    "rows": 40283
  },
  "name": "mytable",
  "columns": 8,
  "rows": 40283
}
{code}

I think we can best accomplish this by adding a new property named "Destination 
Conflict Strategy" with the following values:

Replace: Replaces the field specified by the property name with the results 
(the current behavior)
Append: Appends the result to the field specified by the property name (the 
desired behavior here)




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to