Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Lookup based on logical conditions

  1. #1
    Join Date
    Dec 2011
    Posts
    18

    Default Lookup based on logical conditions

    Lets say I have the following fields in both input stream and the lookup stream: i_firstname, i_lastname , i_address
    and lkp_firstname, lkp_lastname, lkp_workaddress, lkp_homeaddress

    How can I achieve a key lookup based on a condition like using the kettle steps :
    i_firstname = lkp_firstname
    and i_last_name = lkp_lastname
    and ( i_address = lkp_workaddress OR i_address = lkp_homeaddress)

    Any help appreciated !!!

  2. #2
    Join Date
    Dec 2011
    Posts
    18

    Default

    Hi, Any one has some inputs to share about how to achieve the OR part of the condition for a lookup ? Thanks!

  3. #3
    Join Date
    Apr 2008
    Posts
    1,771

    Default

    Hi.
    I know that it is not ideal, but I would create 2 different lookup steps.
    First match all records using one key (firstname, lastname, work adrress), then use a filter to select rows that did not match and match them using the other key (firstname, lastname, home address).

    Mick

  4. #4
    Join Date
    Dec 2011
    Posts
    18

    Default

    Thank You Mick for your inputs!

    I think it would be a very good idea to include provisions to do logical OR in merge joins, and lookup steps. This is a very basic real world use case, where we want to do both AND and OR in the same step.

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.