Support Questions

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

How to create a new attribute with value as the content of the flowfile?

avatar

I am using PutSyslog and need to pass in the content of the flow file.

Q 1 - Is there a way to reference the content of flow file directly within the MessageBody field of the PutSyslog processor?

Q 2 - If not, how do I add the content of the flow file as processor so that I can pass the attribute to the MessageBody?

1 ACCEPTED SOLUTION

avatar
Master Guru

The ExtractText processor is used to pull up text from the content of a flow file into an attribute. You should be able to add a property like "message.body" with a value of "(.*)" to ExtractText to get it to extract everything.

Keep in mind this only makes sense for small messages. Attributes are held in memory and if you did this with a huge flow file you could blow up the memory of your Java process.

View solution in original post

2 REPLIES 2

avatar
Master Guru

The ExtractText processor is used to pull up text from the content of a flow file into an attribute. You should be able to add a property like "message.body" with a value of "(.*)" to ExtractText to get it to extract everything.

Keep in mind this only makes sense for small messages. Attributes are held in memory and if you did this with a huge flow file you could blow up the memory of your Java process.

avatar
Explorer

This resulted in error: "message.body is invalid when validated against (.*) because message.body is not supported property"