Member since
03-20-2023
2
Posts
0
Kudos Received
0
Solutions
05-04-2023
10:55 AM
Hi @SAMSAL , thanks for your response. You are right, changing to "Entire Text" worked I was in a hurry and didnt try changing the evaluation mode. I supposed that "Always Replace" would do the work. Thank you
... View more
05-04-2023
09:57 AM
Hello. Well, I have a nifi flow that is triggered by a ListFile processor. ListFile creates an empty content flowfile and sends it to success queue. I want to write some fixed content ( say "id,description,date" ) on this empty flowfile. The goal is to write an empty csv with that header in HDFS as first action of the flow. So I was trying to use ReplaceText for writing the content to the empty flowfile. The flow looks like this ListFile ---> ReplaceText (see image below) ReplaceText has the following settings: Replacement Strategy = Always Replace, Replacement Value = id,description,date At first I thougt that ReplaceText could fail cause incoming flowfile had no content. But ReplaceText sent the flowfile to success BUT NO CONTENT WAS WRITTEN (It is still empty) In the image below you can see that Queued Bytes are 0 Setting Bulletin Level to "DEBUG" just throws the following message : "ReplaceText[id=501319d3-354d-1482-6c84-d176639be85f] Transferred FlowFile[filename=Control de trabajos de pala - Control punto a punto.csv] to 'success'" Is Replacetext supposed to write content on an empty file ? If not then empty flowfile should be sent to failure queue, right ? Note: for reproducing the bug (I guess we can call it a bug), you can use GenerateFlowfile instead of ListFile and you will get the same result. Thanks for any feed back. I guess i will have to use a ExecuteScript processor which is a bit more dificult.
... View more
Labels:
- Labels:
-
Apache NiFi