on 07-23-2015 10:46 AM
Hi All,
Filename and directory details are coming from source system.Through dynamic configuration udf we can set the filename and directory.
Whether it is possible to achieve it in single UDF by taking 2 input parameters instead of writing 2 different UDF for filename and directory.
Could you please provide the java UDF for this.
Regards,
Karthiga
Hi Karthiga,
Please refer the below wiki
regards,
Harish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Karthiga,
Yes, of course. Just use two input arguments e.g var1 and var2. UDF can be simple type
Here is a sample code:
DynamicConfiguration conf = (DynamicConfiguration) container .getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey fname = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
DynamicConfigurationKey dir = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
conf.put(fname,var1);
conf.put(dir,var2);
return "";
Regards,
Mark
HI Karthiga,
Yes, using single udf, we can set both filename and directory.
Can you please refer the links suggested in the above replies.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Karthiga,
In this thread you have first Justin code to set a dynamic filename and later Bhavesh code to set a dynamic directory name. You can develop your UDF writting first one code and later the other. You only need to set two parameter as the codes have like parameters: dynaname, and instead of "DIRECTORY VALUE" your parameter for the directory.
You can notice the codes are very similar the unique diference is the codes modify diferent value on DynamicConfigurationKey variable. Check the codes, they are easy to understand.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
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.