on 11-30-2009 4:34 PM
I have a directory that contains two different files. Hierarchy1_mm-dd-yyyy.txt and Hierarchy2_mm-dd-yyyy.txt
Here is my goal:
1. Pick up both files with one sender channel.
2. Drop the files in a new directory as Hierarchy1 and Hierarchy2
Currently I have a sender channel that picks up a .txt file from source directory and a receiver channel that drops the file in a new directory. I do this all through the Integration Directory side. Problem is i have two different files and am only creating one file in my target directory. I need to pick up two files from the source and drop two files in the target. I realize i can do this buy creating two sender channels and two receiver channels but that requires me to create two of everything else as well. I would like to do this with one sender and receiver channel.
Derrick,
If you can use *.txt in sender CC, then you can do the following.
In Sender channel, check Adapter Specific Message Attribute "File Name"
In Receier communication channel in file name scheme put %File_Name%
Then you will be having same file name in receiver directory as you have in sender directory.
Regards,
Venu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Only one thing. In my target directory the file has to be placed without the date stamp. So as the source file is
Hierarchy1_mm-dd-yy.txt in the target directory it needs to be just Hierarchy1. Can I use the same scenario you gave me but rename the two files that are sent to not have the date stamp?
Hi
> Only one thing. In my target directory the file has to be placed without the date stamp. So as the source file is
> Hierarchy1_mm-dd-yy.txt in the target directory it needs to be just Hierarchy1.
For this you can use the dynamic configuration code
Based on your requirement you can change the code like below, and map this UDF to the Top most root node.
DynamicConfiguration conf=(DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key=DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String targetFileName="Hierarchy1.txt";
conf.put(key,targetFileName);
return "";
Regards
Ramesh
User | Count |
---|---|
84 | |
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.