Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

how to add output stream relationship result of Execute Stream Command processor into original flow file

avatar
Explorer
 

I need a help, I am new to NiFi. I am using python script. I wanted to add output stream relationship result of ExecuteStreamCommand processor into original flow file. In original file I am getting body and the script is generating users information. Please help me

1 ACCEPTED SOLUTION

avatar

first you need to check if there is an attribute called filename on the original flowfile and its the same passed the output stream flowfile. If there is, then you should specify it as "filename" in the merge content property and NOT as "${filename}".

View solution in original post

11 REPLIES 11

avatar

Hi,

Not sure I fully understand your question. Can you please provide screenshot of the flow you have and explain the expected output of each processor? From what I can understand you want to keep the original file but somehow you want to attach the output of the command stream to it. There is property on the ExecuteCommandStream Processor called "Output Destination Attribute" where you can store the output stream as an attribute on the original flow file. if you want to modify the content of the flow file after that based on the new attribute then you can use ExecuteScript Processor.

 

avatar
Explorer

Hi @SAMSAL , it should not return as an attribute but the data, because the output stream contains decrypted data and the original flow file also has the some important data