cancel
Showing results for 
Search instead for 
Did you mean: 

mapping occurence

Former Member
0 Kudos

hi experts,

my input file has 3 type of records:

type0 1..unbounded

field1

field2

type1 0..unbounded

field1

field2

type2 0..unbounded

field1

field2

my input file has 3 types of records, the first (type0) that always comes with data, the second and third (type1 and type2) that can come or not come if they can do so more than one after registering for the same type 0. We need to use standard functions to control this?, I mean, it is not enough to indicate the occurrence for who knows how to interpret it?

very thanks,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

thanks all,

I'm already using the function removecontext, 3 times to remove the tags from type0, type1 and type2, .. but the node type0 not mark the occurrence of the target node

Former Member
0 Kudos

Hi,

Use this function only in data fields (field0.type0, field1.type0...), not in your parent nodes (ype0, type1...)

Carlos

Answers (6)

Answers (6)

Former Member
0 Kudos

sorry,

I think I am approaching the wrong problem, the input file has 3 different types of records, but not in the way that I represented, the contents of the file is exactly:

0; type0field1; type0field2

1; type1field1; type1field2

2; type2field1; type2field2

when I read the file I do register to register until they finish reading the record of type2 (if any, because you can not come, remember that the only obligatory register of type 1) I do not have the destination node. It is possible to do this in the mapping or need to use bpm?

Former Member
0 Kudos

thanks,

that's what I'm doing, though it does not work, for example, if the input file are 2 records of type 1 are generated 2 target nodes, when it should generate a single, which should mark the number of nodes target is register of type 0 and I do not know how to indicate

Former Member
0 Kudos

Hi Silvia,

Use removeContext node function in all your nodes before concatenating your nodes.

Carlos

SudhirT
Active Contributor
0 Kudos

Hi,

As said above either use removeContext function or change the context of the source fields to one level up in hierarchy.

Thanks!

former_member193376
Active Contributor
0 Kudos

Hi

According to my understanding, you want to concatenate only those fields which are having data,

if this is the case, then use standard functions IF THEN and check if the field is blank, if its blank, do not concatenate, else you concatenate it.

Thanks

Saiyog

Former Member
0 Kudos

thanks,

my target node is a single field that is the concatenation of all,

field target = type0field1;type0field2;type1field1;type1field2;type2field1;type2field2

the possibilities depending on the information of input data can be,

field target = type0field1;type0field2

field target = type0field1;type0field2;type1field1;type1field2;type1field1;type1field2

field target = type0field1;type0field2;type1field1;type1field2;type1field1;type1field2;type2field1;type2field2

field target = type0field1;type0field2;type1field1;type1field2;type2field1;type2field2

...

SudhirT
Active Contributor
0 Kudos

Hi,

you can map with concat function all the fields from different(type0,type1,type2 nodes) nodes.

Whatever the no. of fields will come they will be concatenated based on the occurence and context as shown below.

type0field1     
              concate-------------------concat---------concat------target field
type0field2         type1field1              type1field2

Thanks!

prateek
Active Contributor
0 Kudos

Your requirement is not very clear. I would say that defining the nodes would be sufficient in understanding point of view. If you want to implement some logic, then standard functions could be used based on you requirement.

Regards,

Prateek

SudhirT
Active Contributor
0 Kudos

Hi,

You need to map the type0,type1,type2 to target fields as specified in your mapping specification unbounded nodes will be mapped with the unbounded of target side.

If the source file contains 1 occurence of type1 type node then target will also contain 1 occurence of type1 type node.

Thanks!