cancel
Showing results for 
Search instead for 
Did you mean: 

How to archive a file which exceeds the max restriction file size in SFTP adapter

Former Member
0 Kudos

we have a requirement to process files below 500 MB and if there are any files above 500 MB then an error should be triggered and eventually the file should be archived.

Based on the above requirement, error is getting triggered but not able to archive the file using standard methods of archiving.

If we check maximum file size restriction and mention the size as 524288000 Bytes

and also check error when restricted option then,

whenever a file exceeds this limit the channel goes into error state.

Please provide a solution to archive such files from the directory as and when the channel goes into error state due to the large files.

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi Mayuri,

What is your SFTP addon version?, you can upgrade it and to use the the "Bypass PI Runtime for File Transfer", check this link

Regards

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Everyone,

Thanks for the fast response.

We tried to resolve this requirement using Chunk Mode and running script before message processing- which would copy the files to archive folder and running a second script after message processing to delete the message from the source folder.

But this solution didnt seem quite reliable going forward(according to our architects)

Hence trying to explore Bypass PI runtime mode as explained in SFTP Adapter - Handling Large File.

Thank you

Mayuri

anupam_ghosh2
Active Contributor
0 Kudos

Hi Mayuri,

                  Since adapter is getting in error better to request sender to limit the size of the file from their side. Other way round is to run a script from PI server at regular hours. The script checks the file size in source directory of server. Moves the eligible files to a new folder from where SFTP adapter will pick up the file. You can check this link for sample scripts Google Groups

Regards

Anupam

 

gagandeep_batra
Active Contributor
0 Kudos

Hi Mayuri,

You can check the condition at receiver level and if the size is > than 500MB you send it to archive folder else send to target.

Regards

Gagan

gagandeep_batra
Active Contributor
0 Kudos

Hi You can check Archive faulty Files and set maximum file restriction :

Regards

gagan

Former Member
0 Kudos

Hi Gagan,

I have tried this option but if we set a max size then any file exceeding max size is not treated as faulty file, rather it is ignored by the adapter.