on 02-25-2016 9:55 AM
Hello
I am currently on PO7.4 and facing an issue with variable substitution.
I am getting the filename from the payload as TEST1234.csv.
It is populating correctly using variable substitution. And in the filename of the channel i have given as %filename%.
When I add timestamp to it, it comes like this test1234.csv20160223 rather than test123420160223.csv
Is there a way to correct this?
Please note that I don't want to do this in mapping where i can strip the .csv and add it in %filename%.csv. As we are in a migration project and would want to achieve this with config only.
Regards
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vikas
As i mentioned in my post, it is easy for me to just rip off the .CSV from the mapping which is easier.
Since it is migration project, I don't want to do any changes in the mapping and just trying to find a way to achieve via config.
Regards
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sam,
Please write Dynamic configuration udf and it will solve your problem.
try this
String dateFileName= new SimpleDateFormat("yyyyMMdd'.csv'").format(new Date());
String fileName=var1+dateFileName;
conf.put(key,fileName);
var1 will have value coming from payload
Regards,
Vikas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.