Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Database Lookup with Integer

  1. #1
    Join Date
    Jul 2013
    Posts
    5

    Question Database Lookup with Integer

    I have a time dimension table with a key attribute called date_key of type Int (10)

    I'm trying to get some other attributes from this time dimension table via the Database lookup node with the following match fields:
    Table field Comparator Field1
    date_key = a_date


    a_date is a Kettle variable of type Number (8) obtained applying the Java Script parseInt funcion to a string containing values with the format yyyyMMdd (for example '20131030').

    The Database lookup node isn't retrieving anything. Of course this is because the node don't find any coincidences via the match fields, but the values I'm searching for in the time dimension table are there.

    I guess the problem comes from the data types (Int vs Number), but I have tried also with Integer type for a_date and the problem persist (nothing obtained from the Database lookup node).

    I have no idea about how to solve the problem... Anybody have?

  2. #2
    Join Date
    Nov 2008
    Posts
    777

    Default

    Quote Originally Posted by tanis View Post
    a_date is a Kettle variable of type Number (8) obtained applying the Java Script parseInt funcion to a string containing values with the format yyyyMMdd (for example '20131030').
    Yes it could very well be an Integer vs Number issue. So why wouldn't you use the Get Variables step and assign a_date directly as an Integer within that step? I happen to know that, when set up properly, the Database Lookup step usually performs as advertised. Please provide more details if you need more help.
    pdi-ce-4.4.0-stable
    Java 1.7 (64 bit)
    MySQL 5.6 (64 bit)
    Windows 7 (64 bit)

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.