I want to remove all attributes from a given flow file except the ones I explicitly define to keep.
Given the following sample flow file attributes:
name: aaa
Place: bbb
Host: ccc
JsonAttribute: {
"A": "a",
"B": "b"
}
data: ddd
And I want to keep Host and JsonAttribute only.
Thus, the resulting flow file attributes should be:
Host: ccc
JsonAttribute: {
"A": "a",
"B": "b"
}
How can I achieve this using the standard processors NiFi provides?
renaming the attributes
Is it possible to rename the attributes using the same procedure? E.g. I would like to keep the attributes like above but rename JsonAttribute into customName