How to call a stored procedure in DB2

llohmann
llohmann New Altair Community Member
edited November 2024 in Community Q&A
Hello everyone,

I found this Question: https://community.rapidminer.com/discussion/29665/execute-stored-procedure-with-read-database-operator 

Which is already helpful, but it doesn't work in my context, bc I think its an oracle DB in their case. In my case I have a DB2 stored procedure and I want to call it, to get something back in RM Studio.

So what I've tried is the following:

Read DB Operator with SQL Code:

"SELECT *
FROM (
   CALL Schema.NameOfProcedure(%{LOADING_SCHEMA}, %{LOADINGTABLE})
)"

Is my Syntax messed up? Because I'll always get an error.
Tagged:

Answers

  • BalazsBaranyRM
    BalazsBaranyRM New Altair Community Member
    Hi,

    there could be many problems. 

    Does the query work in a native SQL client? Does it work with the actual parameters in RapidMiner (instead of the macros)? Maybe you need to quote the macro values with single quotes? '%{LOADING_SCHEMA}' etc.

    What does the error message say? Do you find additional information in the log of the database server?

    Regards,
    Balázs

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.