Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

NiFi: ExecuteStreamCommand STDIN and STDOUT


NiFi: ExecuteStreamCommand STDIN and STDOUT


Can some one please give an example of STDIN and STDOUT in python script to take input from Nifi flowfile and paas the output file to NiFi flowfile again. I am using below script for STDIN and STDOUT. STDIN seems to be working fine but STDOUT is not working. Please help


f = sys.stdin
reader = csv.reader(f)


##Python code for creating the output file and passing it to STDOUT

xmlfile = open("C:\\Output_from_python\\output_file.xml",'w')
xmlFile.write(doc.toprettyxml(indent = '\t'))
sys.stdout = xmlFile


Don't have an account?
Coming from Hortonworks? Activate your account here