cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Doubt. How to remove SUPPRESS

former_member213558
Active Participant
0 Kudos

HI All.

I want to remove the Suppress which is coming result of CreateIf.

even i tried UDFs which is available in other threads.

first i tried to remove the SUPPRESS using blow code

and the result is, it not removing the SUPPRESS, and in place of suppress i'm getting null.

and aging i tried one more UDF to remove the null which is available in other thread as mentioned below.

and now i can able to remove the SUPPRESS but it's not giving the proper count of values, it's giving only one output for every context change.

based on this example expected result is

[]

[]

context change

[]

[]

context change

[]

[]

context change

please do needful.

Thanks and regards.

Accepted Solutions (1)

Accepted Solutions (1)

former_member182412
Active Contributor
0 Kudos

Hi Ramesh,

Use below mapping after remove contexts in your mapping logic.

REC_TYPE equals to EMPLOYEE --->removeContexts--->UDF--->employees(Node)

UDF:

Execution Type: All Values Of Context.


public void mapEmployeeNode(String[] input, ResultList result, Container container) throws StreamTransformationException {

  for (int i = 0; i < input.length; i++) {

  if (input[i].equals("false")) {

  if (i != 0)

  result.addContextChange();

  } else

  result.addValue("");

  }

  }

Regards,

Praveen.

former_member213558
Active Participant
0 Kudos

thank you Praveen it's working fine,

Answers (1)

Answers (1)

former_member237514
Participant
0 Kudos

Hi Ramesh,

you can try this logic

rec type

                    ----UDF1----- remove suppress UDF---splitbyby value(value chnage)-----target

Employe

udf1:

UDF2:for deleteing suppress u can use ur udf .

try the above mapping logic and let me know if u have any issues

Thanks

Kavitha