on 12-16-2008 5:44 PM
Hello,
we have scenario File --> XI --> proxy, where XI picks up the file from a folder. The file is generated by some job once per day. The file name should be xxxdate.txt, for example, suppose today is Dec. 25, 2008, then the PI should pick up the file xxx20081225.txt. My questions is how to specify the file name in the sender CC.
The only solution I can come up is to specify \*.\* as file name and have a UDF in the mapping to check the send file name, only if hte file name contains today's date, a target message is generated. However this is not good solution, suppose the folder contains 1000 files, PI would pick up all the files un-neccessarily.
Anyone has good idea?
Jayson
Why dont you ask you file generating system to put an initial character in the file name so that you can specify like A.. Otherwise cant they put just these file in a sub folder?
Because date is a variable in the file name. so it is as good as . itself..!! I think the only solution possible.. you have already given it..!!
VJ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jayson
If i understood your requirement correctly. you want to pick files for a particular date only?
To do this you can write a simple module which picks files for a particular date only.
If the problem is you dont want to use .txt then as said above use xxx.txt. You can set the criteria you want to pick these files.
Thanks
Gaurav
Hi Pooja,
as said, the sender belongs to other system, we are NOT allowed to delete the file, those files are maintained by other group.
Sudhir, I want to pick up only one file, as picking up all files is not what I want.
Gaurav, even with a module, all the files would be picked up to the java module for check, which is again not what I want.
I guess, there might be no perfect solution for it. Just specify xxx*.txt, and let mapping UDF program to ignore non-today's file.
If anybody has better idea, I'd appreciate it.
Jayson
Hi Jayson
Right now also you are doing similar thing as i asked for Adapter module.
You are picking the file *.txt and then rejecting the data based on UDF.
To make it mapping independent i suggested to go for adapter module. You can check the files in folder itself and can pick only the file you require. It will traverse through the complete folder.
Looking at one more aspect. Only one file will be send from AE to IE.
Well i most of the times use Unix scripts for such purpose. I would have pick todays file from source to another folder and pick files from that folder. Keeping PI away from coding and let the job done at server end itself.
Thanks
Gaurav
Probably
you can use variable substitution and pass the current date in one of additional target field and use this in variable substitution.
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 |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.