Skip to Content
avatar image
Former Member

conditional mapping of node-elements

Hello experts,

i've a simple mapping question:

Dest. Node:

<src_node> occurrence 1:n

<qualifier>

<value>

</dest_node>

<dest_node> occurrence 1:n

<qualifier>

<value>

</dest_node>

Mapping:

<src_node> -


> <dest_node>

This means 10 source nodes produce 10 destination nodes. No problem so far.

But how do tell the mapper just to generate these dest_nodes where the field <i><b>qualifier</b></i> of each occurence of src_node is i.e. "XX"?

Is it possible to do this by standard functions or do i need to write UDF?

Regards

Gunnar

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Sep 18, 2007 at 04:00 PM

    Gunnar,

    Try this.

    qualifier[remove context]---> 
                                           equals------ CreateIf ---->Dest_node
                 Constant[XXX]--->
    

    Map Qualifier --- Qualifier

    Value---Value.

    raj.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 18, 2007 at 03:42 PM

    hey

    >>where the field qualifier of each occurence of src_node is i.e. "XX"?

    use the CreateIf standard function

    thanx

    Aamir

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hey

      >>According the documentation, createif is for tags - not for nodes...

      CreateIf() is used when we have to select a node along with all its sub-nodes,its used not just for tags.

      have a look at the following blog and see how he has generated the output structure based upon the input structure

      /people/stefan.grube/blog/2006/01/09/the-use-of-suppress-in-the-xi-30-graphical-mapping-tool

      thanx

      Aamir

  • avatar image
    Former Member
    Sep 18, 2007 at 04:11 PM

    Gunnar, pretty easy:

    if//qualifier . equalsString "XX" -> createIf -> dest node

    so on the left:

    src_node/qualifier . equalsString "<constant>"

    the result leads to createIf fct -> result to dest_node

    Peter

    Add comment
    10|10000 characters needed characters exceeded