Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to get the filename nifi

Highlighted

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

Re: How to get the filename nifi

New Contributor

Sorry, i found it in a tutorial:

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

Don't have an account?
Coming from Hortonworks? Activate your account here