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

How to get the filename nifi

New Contributor

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

New Contributor

Sorry, i found it in a tutorial:

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