Micro_Andy
Micro_Andy

Reputation: 113

Adding newline when using mergecontent processor to combine each csv flowfile

This is the question about MergeContent Processor in Nifi. I would like to add newline when combining each csv flowfile, using MergeContent processor.

Similar to my problem, there was an answer to the question here.

link

It says I only have to set "Text" for Delimiter Strategy and type "shift+enter" for Dmarcator in property setting.

But it didn't work at all, printing "shift+enter" at the end of each flow file. I also tried "\n","\n" [shift+enter] and other ways and none of them works.

Expected output:

column1, column2, column3

value1, value2, value3,
value4, value5, value6,

Actual output:

column1, column2, column3

value1, value2, value3 shift+enter value4, value5, value6 shift+enter,,,

Upvotes: 0

Views: 1411

Answers (2)

Bryan Bende
Bryan Bende

Reputation: 18640

You aren't supposed to type in "shift+enter" into the demarcator, you press those keys while in the demarcator value field to create a new line. The value should field should still appear as blank when looking at it, but there will be a new line character if you have pressed those keys.

Upvotes: 1

daggett
daggett

Reputation: 28599

symbol with code 10 stands for LF or \n.

https://en.wikipedia.org/wiki/Newline#Representation

means you have to use following expression: ${literal('
'):unescapeXml()}

Upvotes: 0

Related Questions