MikeThomsen commented on a change in pull request #4739:
URL: https://github.com/apache/nifi/pull/4739#discussion_r554147729
##########
File path:
nifi-nar-bundles/nifi-graph-bundle/nifi-graph-processors/src/main/java/org/apache/nifi/processors/graph/ExecuteGraphQueryRecord.java
##########
@@ -223,14 +237,19 @@ public void onTrigger(final ProcessContext context, final
ProcessSession session
}
dynamicPropertyMap.putAll(input.getAttributes());
+ if (getLogger().isDebugEnabled()) {
+ getLogger().info("Parameter map: " +
dynamicPropertyMap);
+ }
List<Map<String, Object>> graphResponses = new
ArrayList<>(executeQuery(recordScript, dynamicPropertyMap));
OutputStream graphOutputStream = session.write(graph);
String graphOutput =
mapper.writerWithDefaultPrettyPrinter().writeValueAsString(graphResponses);
graphOutputStream.write(graphOutput.getBytes(StandardCharsets.UTF_8));
graphOutputStream.close();
session.transfer(graph, GRAPH);
+ records++;
} catch (Exception e) {
+ getLogger().error("Error processing record", e);
Review comment:
Not a good one, but I decided to add the record index.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]