cancel
Showing results for 
Search instead for 
Did you mean: 

SFTP Receiver, Archive files on PI server

Former Member
0 Kudos

When using SFTP Receiver, Archive files on PI server we want to generate the archive file with a timestamp.

However, we do not want a timestamp when we are generating the actual file on SFTP folder.

For this, when we use %TIME placeholder, it is generating the unix timestamp like 1339228856459.

Is it possible to generate the usual time stamp on the archive file name instead of unix time stamp.

Is there any other place holder which could do this.

Thanks,

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Jaya,

Write an UDF with the following code, I think it will be helpful for you to resolve the issue.

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");

Date now1 = new Date();

SimpleDateFormat formatter = new SimpleDateFormat ("yyyyddmmhhmmss");

String dateString1 = formatter.format(now1);

String final = a + dateString1;

conf.put(key,final);

return (final);

Regards,

Sagarika

Former Member
0 Kudos

Hi

did u find a solution?

Thanks