Skip to Content
avatar image
Former Member

Filtering depending on field values in rows

Hi All,

I have ROW which is 0...unbounded containing 10 fields.

In my reuirement, one of the field, suppose field1 is starting with "A" then i have to delete complete row and go to next row.

Please help me in doing this.

Regards

Pradeep

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Sep 08, 2010 at 09:37 AM

    Hi Pradeep,

    you need the following UDF (ExecutionType: All Values of a Context) for the node ROW:

    boolean flag = true;
    for (int i = 0; i < var1.length; i++) {
        if (var1<i>.startsWith("A")) {
            flag = false;
         }
    }
    if (flag) {
        result.addValue("");
    } else {
        result.addSuppress();
    }

    Then create the following mapping: Field --> UDF --> removeContext --> ROW

    Regards,

    Juergen

    Edited by: Juergen Grallert on Sep 8, 2010 1:31 PM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 08, 2010 at 08:48 AM

    Hi Pradeep,

    What do you mean by deleting the whole row and go to the next?

    Didn't understand your requirement.

    -Supriya.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 08, 2010 at 09:25 AM

    Hi Pradeep,

    Try with if with else,not equlas,and create if

    it may slove your problem.

    Smile...

    Giriii

    Add comment
    10|10000 characters needed characters exceeded