on 06-09-2012 9:45 AM
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,
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
did u find a solution?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.