Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Lookup from multiple tables

  1. #1
    Join Date
    Nov 2013
    Posts
    24

    Default Lookup from multiple tables

    If I have a .cvs file input with (name, label, value) and I want to look up name in Table 1 to find name_id , look up label in Table 2 to find label_id and populate Table 3 with the corresponding name_id, label_id, value - how do I go about it?

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

    Default

    Exactly how you described it!

    Text File Input (or maybe CSV Input) - Lazy Conversion OFF!
    DB Lookup - Lookup in Table 1 on Stream Value Name = Table value Name, return Name_ID
    DB Lookup - Lookup in Table 2 on Stream Value label = Table value lable, return label_id
    Table output to Table 3

  3. #3
    Join Date
    Nov 2013
    Posts
    24

    Default

    Thanks! If I want both name_id and label_id in the same row in the output tables, would I need to use something like a 'merge' transformation?

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

    Default

    Nope. Just flow from the CSV in through the DB lookup for name_id to the DB lookup for label_id, and then to the Table output.
    **THIS IS A SIGNATURE - IT GETS POSTED ON (ALMOST) EVERY POST**
    I'm no expert.
    Take my comments at your own risk.

    PDI user since PDI 3.1
    PDI on Windows 7 & Linux

    Please keep in mind (and this may not apply to this thread):
    No forum member is going to do your work for you. We will help you sort out how to do a specific part of the work, as best we can, in the timelines that our work will allow us.
    Signature Updated: 2014-06-30

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.