Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Calling a DB Procedure

  1. #1

    Question Calling a DB Procedure

    Hi

    I get the following error when running a 'Call DB Procedure' step:

    2007/11/14 12:11:44 - Call DB Procedure.0 - Starting to run...
    2007/11/14 12:11:44 - Call DB Procedure.0 - ERROR (version 2.5.2, build 252005 from 2007/10/23 19:31:44) : Because of an error, this step can't continue:
    2007/11/14 12:11:44 - Call DB Procedure.0 - ERROR (version 2.5.2, build 252005 from 2007/10/23 19:31:44) : Unable to call procedure
    2007/11/14 12:11:44 - Call DB Procedure.0 - ERROR (version 2.5.2, build 252005 from 2007/10/23 19:31:44) : Missing IN or OUT parameter at index:: 4

    I've checked the procedure which is on an Oracle 10g R2 db, it looks like:

    PROCEDURE AddDataSource
    (
    p_SourceID OUT integer,
    p_ProviderID IN integer,
    p_LoadTime IN timestamp,
    p_Source IN nvarchar2
    );

    This proc works when called manually.

    And the configuration of the step is as follows:

    Step name: Call DB Procedure
    Connection: Test7 (Oracle/Native JDBC)
    Enable auto commit: TRUE
    Result name: p_SourceID
    Result type: Integer
    Parameters:
    p_SourceID OUT Integer
    p_ProviderID IN Integer
    p_LoadTime IN Date
    p_Source IN String

    I pass my parameters in (p_ProviderID, p_LoadTime and p_Source) via a Generated Row step previously.

    Does Penatho DI not like nvarchar2? Is there a weird issue with my OUT integer type? Is there some JDBC thing affecting me?

    Many thanks for any help given,
    Dan Escott

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

    Default

    As far as I can see, your procedure doesn't return an Integer value.
    Try clearing the "Result name" field.

    Matt

  3. #3

    Thumbs up Cheers

    Thanks Matt.

    I've found the solution and it appears to be the need to have the OUT variable as the last variable in the stored procedure signature.

    Thank you for your help,
    Dan.

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.