Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

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

avatar

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

avatar
Master 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

avatar
Master 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.

avatar

Thanks, It worked!