Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: "error looking up row in database" from Database Lookup step

  1. #1

    Default "error looking up row in database" from Database Lookup step

    I have an ETL where I'm only adding new rows. I did this with 3 steps (1) Table Input on source -> (2) Database Lookup on target (so that I only pass the new rows) -> (3) Table output on target.

    I'm getting "error looking up row in database" / "Incorrect syntax near the keyword 'FROM'" from the Database Lookup step.

    That seems like a really bad error message, since I'm not writing any syntax!! Maybe a bug?? How can I get this to work?

    ktr file attached
    Attached Files Attached Files
    Last edited by dsa42; 11-20-2013 at 04:54 PM. Reason: attach ktr

  2. #2
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    You didn't select a field to return from the database lookup step.

    so in effect, you're saying:
    select from Total_ExtCost_history where metric_name={metric_name} and date_filled={date_filled}

    if you add something like ID to the values to return, and then filter on that field (no value -> new record) then you can pass onwards to insert.
    **THIS IS A SIGNATURE - IT GETS POSTED ON (ALMOST) EVERY POST**
    I'm no expert.
    Take my comments at your own risk.

    PDI user since PDI 3.1
    PDI on Windows 7 & Linux

    Please keep in mind (and this may not apply to this thread):
    No forum member is going to do your work for you. We will help you sort out how to do a specific part of the work, as best we can, in the timelines that our work will allow us.
    Signature Updated: 2014-06-30

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.