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.

about getsftp processor's attributes

Solved Go to solution
Highlighted

about getsftp processor's attributes

New Contributor

hello all,

I need to pull files from linux server, so at first i used listFile and fetchFile processors.
The files are being writing and when they are done, nifi need to pull them.
Unfotunatly, listFile timestamp already list the file but fetchFile did not pull them because they are still being writing (i added
last modified limitation). so the files left in the server.
To solve this problem, i started using getSftp which is really good, but it does not include file size attribute.
I can see the file size at DETAILS tab in the flowFile but cant access it.
Do you have any suggestion?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: about getsftp processor's attributes

Super Guru
@john y

We can directly access filesize with

${fileSize} 

and this attribute expression will result the actual filesize value of flowfile.

3 REPLIES 3

Re: about getsftp processor's attributes

Super Guru
@john y

We can directly access filesize with

${fileSize} 

and this attribute expression will result the actual filesize value of flowfile.

Re: about getsftp processor's attributes

New Contributor

Oh that worked. Thank you!

I thought that only writes attributes which apear in the processor documentation are accessable. How can i find each processor accessable attributes?

Re: about getsftp processor's attributes

Master Guru

@john y

There are a core set of attributes that will exist on all FlowFiles:

1. entryDate
2. lineageStartDate

3. fileSize

4. uuid

5. filename

6. path

-

The first four cannot be changed by users.
filename and path can have their values edited by users via something like UpdateAttribute processor.

-

You can insert a logAttribute processor anywhere in your flow to output the key/value attribute map for FlowFiles that pass through it to the nifi-app.log. Just keep in mind that leaving this processor in your flow will result in potentially a lot of log output.

-

Thanks,

Matt