Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Nifi SFTP Mutiple Files into Mutiple HDFS directories (Based on file name)

avatar
Expert Contributor

Trying to move files via Nifi using GetSFTP. Let's say the filename is "DATA1". I want to move DATA1 into HDFS directory DATA1. I also want to do this with DATA2, DATA3, etc... How would this be possible via Nifi without creating a process for each file?

1 ACCEPTED SOLUTION

avatar
Master Guru
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
3 REPLIES 3

avatar
Master Guru
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
Expert Contributor

Thanks, this is exactly what I'm looking for!

avatar
Super Mentor
@Joe Petro

Yes this is very doable...

NiFi automatically creates a FlowFile Attribute called "filename" on every FlowFile that is created. You can use this existing attribute to specify teh target HDFS directory:

12839-screen-shot-2017-02-22-at-50732-pm.png

Of course you will want to modify the above for the complete target path.

Thanks,

Matt