Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Filter rows in DB

  1. #1
    Join Date
    Apr 2011
    Posts
    28

    Default Filter rows in DB

    Hi,
    is Js rhino the best way to filter rows in DB?? For example:
    if((id.getString().lenth() > 3 ) && id.getString().contains("spe"))
    var id = id.getString();

    regards

  2. #2
    Join Date
    Jul 2009
    Posts
    474

    Default

    The best way to filter database rows is to let the database do it for you in the Table Input step, like this:

    length(column_name) > 3 and column_name like '%spe%'

    Your transformation won't have to process as much data, so it will use less memory and run faster.

  3. #3
    Join Date
    Apr 2011
    Posts
    28

    Default

    tx so much. I'm doing it now...

    regards

  4. #4
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    It's written in a language called SQL. This language is always worth learning.

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.