Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: Database join with parameters

  1. #1

    Post Database join with parameters

    Hello,

    I'm try to pass one parameter to Database join, however, a error is happening:
    Couldn't get field info in part [getParameterMetaData()]
    0

    My scenario is following:
    Table Input -> Database join -> Insert/Update
    I extract some values with Table Input step and pass them as parameters to Database join.

    The SQL utilized in Database join is simple, like:
    SELECT * FROM MY_TABLE WHERE MY_PROPERTY = ?
    In my case, MY_PROPERTY would receive a value of type Integer, in which is setted in parameter field of Database join. The Outer join checkbox is enabled.

    When I debugged (through Eclipse IDE), I realized that the error caused is:
    java.lang.ArrayIndexOutOfBoundsException: 0

    My current setting:
    DataBase: Intersystems Caché 2007 (native driver)
    SDK: Java 1.6.0
    KETTLE: 3.0.0.GA

    In the version Intersystems Caché 5.2.3, this error is not happing.

    Can anybody help me?

    Thanks
    Dhiogo

  2. #2

    Question Cache's driver is not supplied on

    One question about Cache's driver,
    Why doesn't the release 3.0 of Kettle supply the Cache's driver?

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

    Default

    Intersystems apparently has a restrictive distribution license for the Caché JDBC driver and so we can't distribute that.
    Please note that we removed it, not because we have been asked to do this, but because their license seems to forbid it. (according to our analyses and our laywers).

    Matt

  4. #4
    Join Date
    Jan 2008
    Posts
    3

    Default

    Hello
    I have the same problem, under v3.0.1

    In data join step, my SQL code is
    SELECT
    P.SOC_DIST AS AGE
    FROM
    POSITIONS P
    WHERE
    P.ANNEE_POS= ?
    AND P.MM_TA= ?
    AND P.JJ_TA= ?

    with 3 input variables

    When I run it, the message said

    Erreur lors de la récupération des champs pour cette étape
    Couldn't get field info from [SELECT
    P.SOC_DIST AS AGE
    FROM
    POSITIONS P
    WHERE
    P.ANNEE_POS= ?
    AND P.MM_TA= ?
    AND P.JJ_TA= ?
    0

    When I look after the input Variables the selected ones are in the list.


    So I look my BD connection, it's not a Intersystem cahé but a oracle (Native JDBC)

    I don't know how to short-circuit this bug

    Thanks
    Last edited by Wilfried; 01-04-2008 at 10:30 AM.

  5. #5
    Join Date
    Apr 2007
    Posts
    7

    Default Another problem with parameters in database joins

    I'm also getting this same error using the following SQL with an Oracle JDBC connect

    SQL:
    SELECT C.PRIMARY_KEY CREATED_BY_CONTACT_PK
    ,C.NAME CREATED_BY_CONTACT_NAME
    ,C.MIDDLE_NAME CREATED_BY_CONTACT_MIDDLE_NAME
    ,C.FIRST_NAME CREATED_BY_CONTACT_FIRST_NAME
    ,C.TYPE_IID CREATED_BY_CONTACT_TYPE_IID
    FROM Y_USER U,T_CONTACT C
    WHERE U.CONTACT_ID = C.PRIMARY_KEY
    AND U.PRIMARY_KEY = ?

    Error:

    Error obtaining fields for this step

    Couldn't get field info from [SELECT C.PRIMARY_KEY CREATED_BY_CONTACT_PK
    ,C.NAME CREATED_BY_CONTACT_NAME
    ,C.MIDDLE_NAME CREATED_BY_CONTACT_MIDDLE_NAME
    ,C.FIRST_NAME CREATED_BY_CONTACT_FIRST_NAME
    ,C.TYPE_IID CREATED_BY_CONTACT_TYPE_IID
    FROM Y_USER U,T_CONTACT C
    WHERE U.CONTACT_ID = C.PRIMARY_KEY
    AND U.PRIMARY_KEY = ? ]

    0

    Can you please address this issue?

  6. #6
    Join Date
    May 2006
    Posts
    4,882

    Default

    lol... error was fixed on 22 December 2007 (if it's the same of course) : http://jira.pentaho.org/browse/PDI-595

    Fix is in 3.0.2 and 3.1

    Regards,
    Sven

  7. #7
    Join Date
    Apr 2007
    Posts
    7

    Default Thanks

    Got Kettle 3.1.0 and all is well now. Thanks!

    -Eric

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.