Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: how can I do with two differ table by cartesian operation transform to one table

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

    Default RE: how can I do with two differ table by cartesian operation transform to one table

    Hi Lin,

    You can just use a lookup for that, either DB Lookup or Stream Lookup.
    It hardly seems like you want to do a Cartesian product, but in case you want, you can always use DB Join to allow it.

    Hope this helps,
    Matt

  2. #2
    Join Date
    Sep 2005
    Posts
    1,403

    Default RE: how can I do with two differ table by cartesian operation transform to one table

    can you give me some example for using DB lookup? I can't get the result which I want. thank you!

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

    Default how can I do with two differ table by cartesian operation transform to one table

    Attachment: dblookup.jpg (Posted by user linpch, set to Plain text type)

    I want to test as following:
    one table:
    id role
    1 manager
    2 employee
    3 employer


    the other table:
    id person role
    1 mary 1
    2 hello 2
    3 linpch 3
    4 www 3

    I want the result table:
    id person rolename
    1 mary manager
    2 hello employee
    3 linpch employer
    4 www employer

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

    Default RE: how can I do with two differ table by cartesian operation transform to one table

    Attachment: dblookup.jpg A generic sample can't be given, but see the attachement image.
    It's based on having an input from the "Other Table" (PersonTable) having a field called RoleID.

    So, you would have 3 steps: Table Input, DB Lookup and Table Output.

    HTH,
    Matt

  5. #5
    Join Date
    Apr 2006
    Posts
    3

    Default RE: how can I do with two differ table by cartesian operation transform to one table

    thank you! matt.

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.