Support Questions

Find answers, ask questions, and share your expertise

How to get the filename nifi

avatar
Explorer

Hi,

Executing a script i give my csv a name using this comand:

flowFile = session.putAttribute(flowFile, "filename", filename);

Some steps later, i would like to change the name of the file.

¿How can i get this attribute (using JS in an execute script processor)?

I really appreciate your help

Thanks a lot

1 REPLY 1

avatar
Explorer

Sorry, i found it in a tutorial:

var filename = flowFile.getAttribute('filename');