Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Database Lookup Question

  1. #1
    Join Date
    Nov 2013
    Posts
    16

    Default Database Lookup Question

    Hi All,

    Hope you guys can help me out here. What do I do if there's a second condition that I need to meet in order to do a Database Lookup?

    For example. In my source database I have a column of Financial Institution numbers (branch level) and I want to map this value to a column in another database table in order to get a different Financial Institution number (organization level). However, there's second condition that is needed and I don't know what to do. Example:

    Source Table
    FI_Branch_Number
    080911111
    080922222


    Lookup Table
    FI_Branch_Number purpose FI_Organization_Number
    080911111
    A
    080910000
    080911111 B 080910010
    080911111 C 080910100
    080922222
    A
    080920000
    080922222 B 080920020
    080922222 C 080920200


    I need the FI Organization # for purpose A ONLY, So what do I need to do for the 'purpose' field? There's no comparator from the two databases for purpose. Hope I was clear, any help would be greatly appreciated, thanks.

    David

  2. #2
    Join Date
    Oct 2007
    Posts
    107

    Default

    You could use the Stream Lookup with a table input that filters the records having Purpose = 'A'

  3. #3
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Put an Add Constants step in, in this case "Purpose" with value 'A'
    Then include it in your lookup.

  4. #4
    Join Date
    Nov 2013
    Posts
    16

    Default

    I appreciate both replies. Each method got the job done. Thanks again!

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.