exceptionfactory commented on code in PR #9785:
URL: https://github.com/apache/nifi/pull/9785#discussion_r1987463115


##########
nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-processors/src/main/java/org/apache/nifi/processors/jolt/JoltTransformJSON.java:
##########
@@ -55,11 +57,23 @@
 @Tags({"json", "jolt", "transform", "shiftr", "chainr", "defaultr", "removr", 
"cardinality", "sort"})
 @InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED)
 @WritesAttribute(attribute = "mime.type", description = "Always set to 
application/json")
-@CapabilityDescription("Applies a list of Jolt specifications to the flowfile 
JSON payload. A new FlowFile is created "
-        + "with transformed content and is routed to the 'success' 
relationship. If the JSON transform "
-        + "fails, the original FlowFile is routed to the 'failure' 
relationship.")
+@CapabilityDescription("Applies a list of Jolt specifications to the FlowFile 
JSON payload (or) to the Json Attribute. "
+        + "If the transformation is applied on FlowFile content then a new 
FlowFile is created with transformed content and is routed to the 'success' 
relationship. "
+        + "If the transformation is applied on FlowFile attribute then 
attribute is transformed and is routed to the 'success' relationship. "
+        + "If the JSON transform fails, the original FlowFile is routed to the 
'failure' relationship.")
 @RequiresInstanceClassLoading
 public class JoltTransformJSON extends AbstractJoltTransform {
+
+    public static final PropertyDescriptor JSON_ATTRIBUTE = new 
PropertyDescriptor.Builder()
+            .name("Json Attribute")
+            .displayName("Json Attribute")

Review Comment:
   The `displayName()` method is not needed when the `name()` is the same. I 
also recommend renaming the property to `FlowFile Attribute`.
   ```suggestion
               .name("FlowFile Attribute")
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to