- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
about getsftp processor's attributes
- Labels:
-
Apache NiFi
Created 01-22-2019 09:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Created 01-23-2019 01:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We can directly access filesize with
${fileSize}
and this attribute expression will result the actual filesize value of flowfile.
Created 01-23-2019 01:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We can directly access filesize with
${fileSize}
and this attribute expression will result the actual filesize value of flowfile.
Created 01-23-2019 06:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Created 01-23-2019 03:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
