Github user mattyb149 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2099#discussion_r134503713
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AttributesToJSON.java
---
@@ -79,6 +80,17 @@
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
.build();
+
+ public static final PropertyDescriptor ATTRIBUTES_REGEX = new
PropertyDescriptor.Builder()
+ .name("attributes-to-json-regex")
+ .displayName("Attributes Regular Expression")
+ .description("Regular expression that will be evaluated
against the flow file attributes to select "
+ + "the matching attributes. This property can be used
in combination with the attributes "
+ + "list property.")
+ .required(false)
+ .addValidator(StandardValidators.REGULAR_EXPRESSION_VALIDATOR)
--- End diff --
What do you think about supporting Expression Language for this field? You
can keep the same validator, although that doesn't allow validation against
flow files, just Variable Registry properties and such. You could support
regexes from flow file attributes too, but you'd need a new validator and it
would recompile each time, which might not be a great idea from a performance
perspective.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---