Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: Using OR condition

  1. #1

    Default Using OR condition

    Hi All,

    I am using PDI 3.0 to create transformation. I have one query is how to use OR condition?

    Schema 2 <-- Schema 1( I want Schema2 Right Join on Schema1) How I will achieve this?

    or in other words, Schema 2 & schema 1 same key, in transformation I have used

    Schema1.key = Schema2.key, its fetching common records bt I want all records from Schema2.

    Please suggest solution if any.
    Thanks.

  2. #2
    Join Date
    Feb 2009
    Posts
    296

    Default

    Sounds like your data source is only one database and you've been using SQL to join the data. So I suggest to keep to this practice and use SQL for the OUTER JOIN.

    Or did I get you wrong? What transformation step do you use for the join?
    Fabian,
    doing ETL with his hands bound on his back

  3. #3

    Default

    If you are using the 'Merge Join' step of a transformation, you can select the 'Join Type'. You can choose from: Inner, Left Outer, Right Outer and Full Outer.
    That should give you the desired result.
    Just make sure that the input from both steps is ordered in ascending order of your join key - otherwise it won't work.
    Carlos Castro

  4. #4

    Default Using OR condition.

    Hi fabian,
    You are right, I need to use join queries in transformation Table I/P.

    My Transformation has following structure:

    Table Input(Select * from schema) --> DB LKUP 1 --> DB LK UP 2 -->
    Table O/P

    Is this good practice to use join queries in Table I/P? or I have to achieve this using LKUP? If yes then how?
    Prashant D Shelke.

  5. #5

    Default Using OR condition.

    Hi Carlos,

    I tried to use merge control, but its showing only one step in combo-box selection. I have following structure,

    Table I/P(Query on single schema) --> DB LKUP1 --> DB LKUP2 --> Table O/P

    I want to select all rows from [Table I/P] + [same from DB LKUP1] kind of outer join.

    Thanks.
    Prashant D Shelke.

  6. #6
    Join Date
    Feb 2009
    Posts
    296

    Default

    Quote Originally Posted by pdshelke View Post
    Is this good practice to use join queries in Table I/P? or I have to achieve this using LKUP? If yes then how?
    Why should you not let the database do the job? If your source system hast the time and enough power - let it handle these things as databases are optimized to do joins and stuff.

    If you have tow separate databases you will have to use the merge step.
    Fabian,
    doing ETL with his hands bound on his back

  7. #7

    Default Using OR condition.

    Yes, its true let database n machine take care of joins, but is there any benefits of using DB LKUP instead using Joins queries in Table I/P?
    Prashant D Shelke.

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.