Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: database lookup

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

    Default database lookup

    Hi,
    I started using kettle yesterday.
    I had some general questions, might be silly too





    This is my task



    Step 1-> Extract a raw CSV file (was able to do this and view te rows)



    Step2 -> from the extracted rows i would like to compare 2 fields with the fields of a table .i.e i have to compare file-field-1 and file-field-2 with table-field-b and Table-field-c of Table-1



    do i have use database lookup here?






    Step3 -> after the lookup row needs to be inserted in Table1
    conditions:
    if table-field-B and table-field-C are already present do nothing



    if table-field-B and table-field-C are not present insert a row into Table1 which would be table-field-A , table-field-B,table-field-C. Here table-field-A is a sequene number and a primary key for Table1. so this needs to be generated before insertion.



    do i have to use sequencer and/or Insert/update here ?



    please let me know if i have to me more specific , all suggestions are welcome guys



    do we have any demo on combination lookup ?



    Thanks,
    sam

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

    Default RE: database lookup

    Hi Sam,

    You probably figured this out, but indeed, you can use a database lookup to lookup values in a database.
    See the Weekly Kettle Tips for more explanations.
    A certainly a combination lookup is probably the way to go to create new keys in a new table without a natural key.

    This subject has also been beaten to dead on the forum lately.
    However, if you do feel you have a problem or a question, do feel free to ask.

    Enjoy Kettle!

    All the best,
    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.