Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Database Lookup usage/Conditional flow

  1. #1
    Join Date
    Oct 2015

    Default Database Lookup usage/Conditional flow

    Hi PDI Gurus,

    I am a newbie in Kettle and have a very basic requirement:
    I need to implement a conditional flow based on whether a client exists in some table or not. I suppose that the Execute SQL Script or Table Input or Database Lookup will return a result-set with some records or an empty one. I'd like to implement it in the Kettle, not in the DB as in real life condition is more complicated.

    I need a picture showing order of transformations for implementing this simple (I assume so :-)) logic.

    One additional thought: I assumed Data Validator can give a good answer, using "Database Lookup" as a source and its results in Data Validator's "Read Allowed values from Another step" but it didn't help...
    Thanks in advance,
    Last edited by msveta13; 10-20-2015 at 05:36 AM.

  2. #2


    You should use Database Lookup for "your client exists in some table" and add Lookup-Fields.
    If you don't specify a default for the Lookup-Fields, they are NULL if lookup doesn't find anything
    After the Lookup, you can use Filter Step with a condition like "Lookup-Fields is NULL", true means not found :-)
    Or you can specify a default which never can be found in the DB (like -1 for positive integer columns, etc..) and specify a condition like "Lookup-Field = -1"

  3. #3
    Join Date
    Oct 2015


    Hi MUE2000,
    Thanks for the prompt response.
    Your suggestion helped!

    Thanks again,

Tags for this Thread

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.