Hi Mark, This is the script I'm using currently:
import sys TOTAL_DISCONNECTIONS = 0 TOTAL_CONNECTIONS = 0 flowFile = sys.stdin if (flowFile != None): for line in flowFile: if "Lost connection to server" in line: TOTAL_DISCONNECTIONS += 1 if "Established connection to server" in line: TOTAL_CONNECTIONS += 1 attrMap = {"TOTAL_DISCONNECTIONS":TOTAL_DISCONNECTIONS, "TOTAL_CONNECTIONS":TOTAL_CONNECTIONS} flowFile = session.putAllAttributes(flowFile, attrMap) Does it make sense to you? The error message says "filereader" object is not iterable. So what is in flowFile now? How should I access the content in filwFile? Thanks, Tina -- Sent from: http://apache-nifi-developer-list.39713.n7.nabble.com/