on 08-21-2008 10:44 PM
Hi All
Please can someone tell me how can we map a table to a flat structure..
Source Structure with Occurances.
1.ItemTab1 (0-unbounded)
1.1.ItemNumber (0-1).
1.2.ItemDescription (0-1).
Target Structure with Occurances.
2.ProductLine1 (0-1)
2.1.ProductNumber1 (0-1)
2.2.ProductDescription1 (0-1)
3.ProductLine2 (0-1)
3.1.ProductNumber2 (0-1)
3.2.ProductDescription2 (0-1)
etc (3,4,5 etc).
Its a table format from the source which will be in Item1 table- they would send about eight to ten records in Item1 format.
Thus:
row1 of Item table needs to map to Product1.
row2 of item table needs to map to Product2.
row3 of item table needs to map to Product3.
and so on.
please can anyone suggest exact mapping steps if the above can be done.
Thanks!.
Hi,
Is there a way to do it without udf's?.. like by using split by value or remove contexts?
I tried this blog
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
but the problem is it is just generates the 1st record enetered in ItemTab in productline1.
when i try to duplicate the subtree to generate more values in itemtab1 it does not map the second row at all.
Please suggest if there is any other approach other than a udf..
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please go through the following pictures,UDFs code and do mapping.
http://www.flickr.com/photos/14144840@N02/2785522503/
http://www.flickr.com/photos/14144840@N02/2786446204/
http://www.flickr.com/photos/14144840@N02/2785599763/
Note: As shown in PIC-1,you dont have to map ProductLine2,ProductLine3 and so on.
This is only for ProductLine1.
Please let m know if there are any issues.
Cheers,
Jag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Do you have source and Target structures as shown in the following PIC?
http://www.flickr.com/photos/14144840@N02/2785485267/
If Yes i have mapping logic.
Please let me know ASAP.
Cheers,
Jag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
do u mean u need to dynamically create product line nodes based on occurrence in itemtab table
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You need to use simple UDF to pass the corresponding values.
As you will be mapping to 1st structure pass one constant value
(a) temTab1 -
> TestUDF -
> ProductLine1
(b) Constant value "1"--->
Cache Parameter as == Queue and two input parameters as "a" & "b"
//write code here
int i = Integer.valueOf(b);
result.addValue(a<i>);
Use the above UDF for all fields and as per the sequence no of structure it will pass to that flat structure.
Thanks
swarup
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.