on 07-14-2016 11:35 AM
Hi Team,
I am having requirement that Target file need to be generated in hour and append contents to to that generated file ,For example if i got message at 03.15 then message has to create xx-xx-xx-030000.txt and after processed messages up to 04:00 all payloads need to appended to xx-xx-xx-030000.txt. Could you please share your ideas to achieve this requirement.
Thanks in advance.
Thanks & Regards,
Ganesh Gullipalli.
Hi Ganesh!
You could use java code in adapter module, UDF or standard functions in graphical mapping depending of your scenario to get current time stamp, construct file name and put it to Dynamic Configuration as file name. In receiver file adapter use ASMA attribute for file name and set file creation mode to Append.
Thus either new file is created or existing file is appended depending on its name.
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Evgeniy,
Thanks for your suggestions.
I did this requirement by using Dynamic configuration and ASMA variables, First i have used UDF in message mapping in that i have placed current hour and date as a file name. second, receiver channel kept in append and enable ASMA check box ,then its creates unique filename for every hour and in between hour all messages appended to that first unique file.
Thanks&Regards,
Ganesh Gullipalli.
Hi Ganesh,
Try like this...
Use variable substitution and add the current hour like 03 or 04 at the end of the file. select the option overrideexisting file....
if file create in between 3-4 file name of that file in that time gap FILENAME_03.txt and if any files comes in between 3-4 it is overwrite the existing file..... after 04 it will create another file with the file name as FILENAME_04.
Thanks,
Sreenivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ganesh!
What is your sender channel and what moment is considered to be the "time of getting message"?
Regards, Eugene.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.