Created on
02-16-2020
01:08 PM
- last edited on
02-16-2020
03:58 PM
by
ask_bill_brooks
Hi,
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'))
xmlFile.close()
sys.stdout = xmlFile
Created 11-24-2020 12:10 PM
Just simple print it.