Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

UpdateAttribute processor is saving the messages in a single line, How do I make it to save every message in a separate line?

I am trying to read messages from IBM MQ to HDFS using Nifi. I was successful in doing so. I am using an UpdateAttribute processor to save the incoming messages in a file and then dump this file to HDFS. File contains all the messages, the only issue is that my messages are getting appended in a single line. I want one message per line. How do I go about doing that?

Any help will be appreciated.

1 ACCEPTED SOLUTION

Super Guru

Do you mean MergeContent rather than UpdateAttribute? The former merges incoming flow files' content into outgoing flow file(s), the latter just adds/deletes/changes metadata about the flow files. If you mean MergeContent, try setting the Demarcator field to the newline character (\n), that should separate the incoming messages by a new line.

View solution in original post

2 REPLIES 2

Super Guru

Do you mean MergeContent rather than UpdateAttribute? The former merges incoming flow files' content into outgoing flow file(s), the latter just adds/deletes/changes metadata about the flow files. If you mean MergeContent, try setting the Demarcator field to the newline character (\n), that should separate the incoming messages by a new line.

Thanks, It worked!

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.