Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

Help with mapping

$
0
0

Hi guys,

 

I have a mapping requirement and I am stuck. Can you help please?

 

 

Source structure:

 

Item (0 to Unbounded)

  Channel (0 to 4)

      Name

         Segment

            id (0 to 1)

 

 

Target structure:

 

Idoc_Segment_01  (0 to Unbounded)

    Data

       Field1  (0 to 1)

       Field2  (0 to 1)

       Field3  (0 to 1)

       Field4  (0 to 1)

 

Mapping:

1. Item mapped to Idoc_Segment_01

2. For a "Channel", if its Name equals "a", map its corresponding "id" to Field1

3. For a "Channel",If its Name equals "b", map its corresponding "id" to Field2

4. For a "Channel",If its Name equals "c", map its corresponding "id" to Field3

5 For a "Channel",If its Name equals "d", map its corresponding "id" to Field4

 

 

If I do direct mapping using If function, I have a problem when once of the optional Source node ("Channel") is absent. It is then taking the value of first occurence of "id" and populating in the first node of the target, but I want it to populate in the corresponding target node.

 

--------------------------------------------------------------------------------------

For example:

 

Source data is:

 

 

Item

   Channel

    a

      segment

         kX1

Channel

    b

      segment

         kX2

Channel

    c

      segment

         kX3

 

 

Item

Channel

   a

     segment

        kY1

Channel

   b

     segment

        kY2

Channel

   c

     segment

        kY3

Channel

   d

     segment

        kY4

 

----------------------------------------------------------------

 

Result I am getting:

 

The result I am getting is:

 

 

Idoc_Segment_01

   Data

     kX1

     kX2

     kX3

     kY4

   Data

     kY1

     kY2

     kY3

 

------------------------------------------------------------------------

 

Result I want should be:

 

 

Idoc_Segment_01

   Data

     kX1

     kX2

     kX3

   Data

     kY1

     kY2

     kY3

     kY4


Viewing all articles
Browse latest Browse all 7030

Trending Articles