[
https://issues.apache.org/jira/browse/NIFI-4552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16227231#comment-16227231
]
ASF GitHub Bot commented on NIFI-4552:
--------------------------------------
Github user mattyb149 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2242#discussion_r148080171
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/QueryRecord.java
---
@@ -102,6 +104,10 @@
@DynamicProperty(name = "The name of the relationship to route data to",
value="A SQL SELECT statement that is used to determine what data should be
routed to this "
+ "relationship.", supportsExpressionLanguage=true,
description="Each user-defined property specifies a SQL SELECT statement to run
over the data, with the data "
+ "that is selected being routed to the relationship whose name is
the property name")
+@WritesAttributes({
+ @WritesAttribute(attribute = "mime.type", description = "Sets the
mime.type attribute to the MIME Type specified by the Record Writer"),
+ @WritesAttribute(attribute = "record.count", description = "The number
of records selected by the query")
+})
--- End diff --
Checkstyle failed with trailing whitespace here
`[WARNING]
src/main/java/org/apache/nifi/processors/standard/QueryRecord.java[110]
(regexp) RegexpSinglelineJava: Line has trailing whitespace.`
Otherwise LGTM, thanks! Will merge after contrib-check passes.
> Add mime.type and record.count to @WritesAttributes doc for QueryRecord
> -----------------------------------------------------------------------
>
> Key: NIFI-4552
> URL: https://issues.apache.org/jira/browse/NIFI-4552
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Extensions
> Reporter: Matt Burgess
> Assignee: Andrew Lim
>
> Currently (NiFi 1.4.0) QueryRecord will transfer any attributes from the
> WriteResult to the outgoing FlowFile, but I don't think there are any (for a
> query) at the time of this writing. However the QueryRecord processor also
> updates the "mime.type" attribute based on the RecordSetWriter chosen, and
> also sets the "record.count" attribute to the number of records that match
> the query.
> None of the aforementioned are in the processor documentation; if the
> WriteResult ones are premature to mention that's ok, but we should add the
> mime.type and record.count attributes to the documentation for QueryRecord.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)