on 04-03-2012 12:26 PM
hi,
i have SourceStructure with occurrence n; and TargetStructure with occurrence m;
for each occurrence of SourceStructure i want to repeat the target structure(with mapping logic associated with it).
FYI. I already have 1-1 mapping with same source and same target with mapping logic with it.
now its N:M (or you can say N:N; as the source and target occurrence are same)
help is appreciated.
thanks all..
as of now i did one to one feild mapping, i'm fine until this point. will have to introduce one more mapping after this to handle logic required which is complicated..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prema, as Ankit says we need more information in order to help you.
At first i suppose that you are using the graphical mapping only.
Right now im going to suppose, you could have an xml source like this:
<SourceStructure>
<a>1</a>
<b>2</b>
</SourceStructure>
You have a graphical mapping with some logic inside, for example using a concatenate function:
<TargetStructure>
<c>12</c>
</TargetStructure>
Now you have the next requiriment:
<NewRoot>
<SourceStructure>
<a>1</a>
<b>2</b>
</SourceStructure>
<SourceStructure>
<a>3</a>
<b>4</b>
</SourceStructure>
</NewRoot>
And you desire one output like this:
<NewRoot>
<TargetStructure>
<c>12</c>
</TargetStructure>
<TargetStructure>
<c>23</c>
</TargetStructure>
</NewRoot>
All this in one operation mapping with cardinality 1:1
With these suppositions the first answer of Ankit Soni should work, you only need to link SourceStructure to TargetStructure with the cardinality changed to unbound.
I suppose the problem is more complicated than this, please correct my supositions and if you want, you could give an XML example
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, it's hard to say without the insight into the mapping, but maybe what you also need to do is set the context of the source fields to the root, and then put the splitByValue(Each Value) for each mapped target field, just before it (so after all the "normal" mapping you do). Let me know the results.
Hope this helps,
Greg
actually it is one of the field mapping;
for EACH PaymentData_Filter i have to create one MRI_PaymentData mapping will consolidate all records for perticular building-ID.. .. buidling -ID can be multple in one PaymentData_Filter based on that it creates so many subnodes in MRI_PaymentData.
example
if i have 4 PaymentData_Filter
------------- 1. PaymentData_Filter
<11>
<12>
<13>
<14>
------------- 2. PaymentData_Filter
<21>
<22>
------------- 3. PaymentData_Filter
<31>
<32>
<33>
-------------- 4. PaymentData_Filter
<41>
if i have 2 building-IDs(assuming two repeates in another two nodes) in 1. PaymentData_Filter then in my MRI_payment it should create 2 subnodes.. so basically i want to handle that context values .. and apply the logic..
HI Prema,
If i understand well ( if i wrong please ignore this message ), right now with :
------------- 1. PaymentData_Filter
<11> with their building-ID
<12> with their building-ID
<13> with their building-ID
<14> with their building-ID
You are generating four MRI_PaymentData, but now you have various PaymentData_Filter.
As far i've seen in your image you are using the SplitByValue(each_value) function on the subnodes.
I think it's better to try the divide and conquer aproximation and try something easy. With
------------- 1. PaymentData_Filter
<11> with their building-ID
<12> with their building-ID
<13> with their building-ID
<14> with their building-ID
------------- 2. PaymentData_Filter
<21> with their building-ID
<22> with their building-ID
How many MRI_PaymentData tags have you got?. The first is to obtain the six MRI_PaymentData nodes.
1. The build-ID, esential to do the deccision, belongs to HeaderRecord, Payment or overflowdetail?
2. Could be the build-ID be repeated?, could be ordered every PaymentData_filter with the building-id?
If the answer is yes you could use SplitByValue(Value_Changed) in order to generate PaymentData_Filter
3. Is it possible that differents PaymentData_Filter have the same building-id and you want to mix them?, if the answer is yes is very complicated to deal with a graphical mapping, at least for me
Regards.
Hi Prema,
If you have all the logic implemented you could use a Mapping template in order to reuse it.
More information:
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prema,
If you are using data types, you can change the occurence of the source & target nodes to 0..unbound for it. If you are xsd, modify the XSD to change occurence.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.