Support Questions
Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

Windows Nifi - tweets are not loading into local windows file

Expert Contributor

Hello All,

I just installed nifi in my windows system and trying to get the tweets using Gettweets, and i have mentioned all the keys in properties.

Before loading the json formated tweets into a json file, i am trying to merge those into single json file using MergeContent processor with name Tweets.json.

MergeContent properties:-


After that when i am tying to put these merged tweets into a file using Putfile processor, i am unable to get the tweets in my file.

PutFile Properties:-


Well i am able to get the tweets from gettweets and the tweets are getting merged using MergeContent but those are not storing into the Tweets.json file using PutFile.


Can anyone suggest me what exactly the mistake am i doing.

Please help.

Mohan V


Master Guru
@Mohan V

A few observations about your above flow...

  1. You are trying to pass an absolute path and filename to the "directory" property of the putFile processor. The PutFile is designed to write files to the target directory using the filename associated to the FlowFile it receives. What you are doing will not work. Instead you should add an updateAttribute processor between your MergeContent processor and your PutFile processor to set a new desired filename on your merged files. How do you plan on handling multiple merged FlowFiles since they will all then end up with same filename? I suggest making them unique by adding the FlowFile UUID to the filename. Below is example of doing this using UpdateAttribute:


  2. Out of your MergeContent processor you are routing both original (all your un-merged FlowFiles) and merged relationships to the putFile processor. Why? Typically the original relationship is auto-terminated or routed elsewhere if needed.
  3. I also see from your screenshot that the PutFile processor is producing a "bulletin" (red square in upper right corner. Floating your cursor over the red square will pop up the bulletin. The bulletin should explain why the putFile is failing.
  4. It appears as though you are auto-terminating the failure relationship on PutFile. This is a dangerous practice as it could easily result in data loss. A more typical scenario is to loop failure relationship back on PutFile processor to trigger a retry in the event of failure.