How to process files with the same name in Apache NiFi?

I am learning NiFi and I am working on a stream where I receive files using GetFile, and then I execute some process and then save them to HDFS using a processor PutHDFS. The fact is that, most likely, I will receive files with the same name. For example, I can get a file every 30 minutes, and the file that is generated every 30 minutes will have the same name.

Now, when I put this file in HDFS, I get "A file with the same name already exists." How can I overcome this? Is there a way to change the file name in a run?

+4
source share
1 answer

. UpdateAttribute . : timestamp .

UpdateProcessor filename ${filename}.${now()}

+5

Source: https://habr.com/ru/post/1668584/


All Articles