Hitachi Vantara Pentaho Community Forums
Results 1 to 8 of 8

Thread: Checking the data existance in Database

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

    Default Checking the data existance in Database

    Is there anyway we can check if the data is already existing in the table where it is going to be inserted

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

    Default RE: Checking the data existance in Database

    Yes, use the Insert/Update step, it only inserts when the key can't be found.
    It only updates when needed.

    Hope this help,

    Matt

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

    Default RE: Checking the data existance in Database

    Hi Matt,
    Thanks for your reply.But my requirement is that if the data already exists in the table it should skip that particular record and proceed with the next Record.
    Rgds,
    Kasi

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

    Default RE: Checking the data existance in Database

    Well then I guess you need to do a lookup then and check if the returned key value is null or not.
    - DB Lookup
    - Filter
    - Insert

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

    Default RE: Checking the data existance in Database

    Hi Matt,
    Is it possible to create a step like Insert/Update without the update ????

    Regards,
    Samatar

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

    Default RE: Checking the data existance in Database

    Dude, use a table output!

    RTFM I guess ;-)

    Cheers,
    Matt

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

    Default RE: Checking the data existance in Database

    Ummm... How is this not done by the Insert/Update step? The way I see the Insert/Update step working is this:

    1. Check if the record exists - if not, then insert record.
    2. If record exists, then update if record contains new information.
    3. Otherwise, do nothing.

    Is this interpretation correct?

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

    Default RE: Checking the data existance in Database

    Yes, that interpretation is correct.

    The insert/update step has been changed in the mean time to have an insert/update WITHOUT the update, using a flag...

    HTH,
    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.