-
Notifications
You must be signed in to change notification settings - Fork 2.8k
NIFI-14331 Allow for removing all undefined elements (not only top level keys) from the JSON when using JsonTreeReader and JsonRecordSetWriter. #9781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
Outdated
Show resolved
Hide resolved
@pvillard31 When you have a chance can you please review? Thanks! |
56bcefa
to
6ee0bf3
Compare
@exceptionfactory Can you please take a look at this PR? My team has a flow which is experiencing this bug and it would be great to have this fix. Thank you! |
assertFalse(flowFile.getContent().contains("fieldThatShouldBeRemoved")); | ||
final List<String> undefinedTopLevelKeys = List.of("undefinedKey", "undefinedObjectArray", "undefinedObject", "undefinedScalarArray"); | ||
|
||
undefinedTopLevelKeys.forEach(undefinedTopLevelKey -> assertFalse(flowFile.getContent().contains(undefinedTopLevelKey))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be simplified to a single assert that the string "undefined" is not in the result? Perhaps you could add a comment stating this covers all of the cases "undefinedKey", "undefinedObjectArray", "undefinedObject", "undefinedScalarArray", "undefinedKeyInObject"
Summary
NIFI-14331
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000
NIFI-00000
Pull Request Formatting
main
branchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-check
Licensing
LICENSE
andNOTICE
filesDocumentation