Support Questions

Find answers, ask questions, and share your expertise

Nifi getsftp processor

avatar
Rising Star

https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.5.0/org.apache...

Can anyone explain what is write attributes in NIFI. where i can find this in getsftp processor.

Thanks in advance

1 ACCEPTED SOLUTION

avatar
Master Guru
@hema moger

Write Attributes means once the processor Fetches the files from the remote path then getsftp processor is going to add those list of write attributes to the flowfile that got pulled from the Remote Path.

Writes Attributes:

NameDescription
filenameThe filename is set to the name of the file on the remote server
pathThe path is set to the path of the file's directory on the remote server. For example, if the <Remote Path> property is set to /tmp, files picked up from /tmp will have the path attribute set to /tmp. If the <Search Recursively> property is set to true and a file is picked up from /tmp/abc/1/2/3, then the path attribute will be set to /tmp/abc/1/2/3
file.lastModifiedTimeThe date and time that the source file was last modified
file.ownerThe numeric owner id of the source file
file.groupThe numeric group id of the source file
file.permissionsThe read/write/execute permissions of the source file
absolute.pathThe full/absolute path from where a file was picked up. The current 'path' attribute is still populated, but may be a relative path

Example:-

I have configured getsftp processor and fetched a file from the remote path, if i do list queue (or) Data provenance in get sftp processor and click on little i icon at the top left corner of the flowfile then we are going to have Details, Attributes tab.

62939-view-queue.png

Go to Attributes tab then you are going to see all the attributes that are listed above will be added to the flowfile.

62940-getsftp.png

As you can view from the above screenshot we got absolute.path,path... attributes added to the flowfile by getsftp processor.

We can use those attributes by using expression language ${absolute.path} for our purposes.

.
If the Answer addressed your question, Click on Accept button below to accept the answer, That would be great help to Community users to find solution quickly for these kind of issues.

View solution in original post

3 REPLIES 3

avatar
Master Guru
@hema moger

Write Attributes means once the processor Fetches the files from the remote path then getsftp processor is going to add those list of write attributes to the flowfile that got pulled from the Remote Path.

Writes Attributes:

NameDescription
filenameThe filename is set to the name of the file on the remote server
pathThe path is set to the path of the file's directory on the remote server. For example, if the <Remote Path> property is set to /tmp, files picked up from /tmp will have the path attribute set to /tmp. If the <Search Recursively> property is set to true and a file is picked up from /tmp/abc/1/2/3, then the path attribute will be set to /tmp/abc/1/2/3
file.lastModifiedTimeThe date and time that the source file was last modified
file.ownerThe numeric owner id of the source file
file.groupThe numeric group id of the source file
file.permissionsThe read/write/execute permissions of the source file
absolute.pathThe full/absolute path from where a file was picked up. The current 'path' attribute is still populated, but may be a relative path

Example:-

I have configured getsftp processor and fetched a file from the remote path, if i do list queue (or) Data provenance in get sftp processor and click on little i icon at the top left corner of the flowfile then we are going to have Details, Attributes tab.

62939-view-queue.png

Go to Attributes tab then you are going to see all the attributes that are listed above will be added to the flowfile.

62940-getsftp.png

As you can view from the above screenshot we got absolute.path,path... attributes added to the flowfile by getsftp processor.

We can use those attributes by using expression language ${absolute.path} for our purposes.

.
If the Answer addressed your question, Click on Accept button below to accept the answer, That would be great help to Community users to find solution quickly for these kind of issues.

avatar
Rising Star

@Shu

This we will get once its successfully imported data from getsftp , then only we can view rite?

62941-data-provenance.png

avatar
Master Guru

@hema moger

Yes, you are right.
Once you successfully fetch any file from sftp server then data provenance will be updated accordingly.