Skip to Content

HCI : Duplicate Target Nodes

Hi ,

I'm looking for solution to duplicate the target nodes in HCI mapping. I have a single source node which is mapped to target node which has cardinality 1...n . This target node should be created multiple times with different values as described below:

Current Mapping:

E1KNVPM is mapped to node PartnerFunction. Based on the occurrences of E1KNVPM , node PartnerFunction is created. my requirement is that when the source node appears once, I need target node PartnerFunction to appear 15 times. for the value in the Source code , I could use the value mapping as below.

Required Mapping:

My Source:

<E1KNVPM>

<PARVW>YES</PARVW>

<E1KNVPM/>

Target:

<PartnerFunction>

<CategoryCode>RE</CategoryCode>

<Partner>

</PartnerFunction>

<PartnerFunction>

<CategoryCode>WE</CategoryCode>

</PartnerFunction>

<PartnerFunction>

<CategoryCode>PY</CategoryCode>

</PartnerFunction>

.

.

.

.

.

..

.

<PartnerFunction>

<CategoryCode>SH</CategoryCode>

</PartnerFunction>

Value Mapping in HCI:

Source : 1

target : RE

Source : 2

target : WE

.

.

.

.

.

.

Source : 15

target :SH

Regards,

Amber Badam

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Nov 10, 2015 at 11:56 AM

    Hi,

    You can easily achieve this by writing an UDF. Please find the sample UDF -

    int b=Integer.parseInt(a[0]);

    for (int i=0;i<b;i++)

    {

    String s=String.valueOf(i);

    result.addValue(s);

    r1.addValue(arr[i]);

    r2.addValue(arr2[i]);

    }

    Thanks,

    Apu

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.