Support Questions
Find answers, ask questions, and share your expertise

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

Accepted Solutions

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.

View solution in original post

Thanks, It worked!