Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 02-22-2017 09:55 PM
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?
Created 02-22-2017 10:03 PM
Use expression language in PutHDFS for the value of the Directory property, so setting it to ${filename} would put each file into a directory named the same as the filename attribute of each flow file in NiFi.
Created 02-22-2017 10:03 PM
Use expression language in PutHDFS for the value of the Directory property, so setting it to ${filename} would put each file into a directory named the same as the filename attribute of each flow file in NiFi.
Created 02-22-2017 10:16 PM
Thanks, this is exactly what I'm looking for!
Created on 02-22-2017 10:08 PM - edited 08-19-2019 03:34 AM
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:
Of course you will want to modify the above for the complete target path.
Thanks,
Matt