lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niran Fajemisin <afa...@yahoo.com>
Subject Re: Using Data Import Handler to invoke a stored procedure with output (cursor) parameter
Date Thu, 31 May 2012 17:44:14 GMT
Thanks for your response, Michael. Unfortunately changing the stored procedure is not really
an option here. 

From what I'm seeing, it would appear that there's really no way of somehow instructing the
Data Import Handler to get a handle on the output parameter from the stored procedure. It's
a bit surprising though that no one has ran into this scenario but I suppose most people just
work around it.

Anyone else care to shed some more light on alternative approaches? Thanks again.



>________________________________
> From: Michael Della Bitta <michael.della.bitta@appinions.com>
>To: solr-user@lucene.apache.org 
>Sent: Thursday, May 31, 2012 9:40 AM
>Subject: Re: Using Data Import Handler to invoke a stored procedure with output (cursor)
parameter
> 
>I could be wrong about this, but Oracle has a table() function that I
>believe turns the output of a function as a table. So possibly you
>could wrap your procedure in a function that returns the cursor, or
>convert the procedure to a function.
>
>Michael Della Bitta
>
>------------------------------------------------
>Appinions, Inc. -- Where Influence Isn’t a Game.
>http://www.appinions.com
>
>
>On Thu, May 31, 2012 at 8:00 AM, Niran Fajemisin <afajem@yahoo.com> wrote:
>> Hi all,
>>
>> I've seen a few questions asked around invoking stored procedures from within Data
Import Handler but none of them seem to indicate what type of output parameters were being
used.
>>
>> I have a stored procedure created in Oracle database that takes a couple input parameters
and has an output parameter that is a reference cursor. The cursor is expected to be used
as a way of iterating through the returned table rows. I'm using the following format to invoke
my stored procedure in the Data Import Handler's data config XML:
>>
>> <entity name="entity_name" ... query="{call my_stored_proc(inParam1, inParam2)}">
...</entity>
>>
>> I have tested that this query works prior to attempting to use it from within the
DIH. But when I attempt to invoke this stored procedure, it naturally complains that the output
parameter is not specified (essentially a mismatch in the number of parameters).
>>
>> I don't know of anyway to pass in a cursor parameter (or any output parameter for
that matter) to the stored procedure invocation from within the <entity> definition.
 I would greatly appreciate if anyone could provide any pointers or hints on how to proceed.
>>
>> Thanks so much for your time
>>
>
>
>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message