Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Filter rows

  1. #1
    Join Date
    Jun 2007
    Posts
    128

    Default Filter rows

    Hi,

    I would like to filter all the rows if a particular field in the row contains characters any of a-z or A-Z.
    How can we do this?
    Ex:
    1234,1234a
    5679,B321
    98,23
    I would like to filter first two rows.


    Thanks
    Sreelatha

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    In the newer versions 3.0/2.5.2 you could use Regular Expression step.

    Javascipt step also has some regex matching.

    Regards,
    Sven

  3. #3
    Join Date
    Jun 2007
    Posts
    128

    Default

    Hi ,

    How can we do this using regular expression,Do we need to compare with each and every alphabet.
    If this way is correct we can also use filter rows with contains and or.

    Thanks
    Sreelatha

  4. #4
    Join Date
    May 2006
    Posts
    4,882

    Default

    Filter step also support REGEXP expressions... so use that... and is also possible in filters.
    You can either use positive or negative expressions for your case... but something is wrong with in v3 it seems.

    Example attached.

    Regards,
    Sven
    Attached Files Attached Files

  5. #5
    Join Date
    Jun 2007
    Posts
    128

    Default

    Hi,
    I amworking with the following data and Kettle-2.5.1.
    outlook,humidity sunny,8A5 sunny,80C rainy,70D rainy,68 rainy,65 sunny,72 sunny,69 rainy,75

    I used RegExp in filter to filter the rows where humidity contains
    characters.I gave the Regular expression as [A-Z]+.
    But it is not rerieving any rows.What might bethe problem here.

    Thanks
    Sreelatha

  6. #6
    Join Date
    May 2006
    Posts
    4,882

    Default

    case sensitivity [a-zA-Z]+ probably.

    Regards,
    Sven

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.