I would like to use the JDBC river to consume a queue implemented in an
MSSQL server.
I have been given a stored procedure to call that hands me the top 100
items in the queue. I'm given a number of columns as output, and the names
of the columns do not correspond to the names of the fields in
Elasticsearch.
Can anyone give me some adult supervision on how I can (or even IF I CAN)
use the JDBC river to call this SP and properly transform the column names,
as they're coming out of the SP's result set, into the proper field names
in my index?
I have started to implement stored procedure calls. They are not complete
in JDBC plugin. At the moment it is an undocumented (incomplete) feature
that can register field names to callable statement result parameters. You
hit the nail - how to map result set output to field names is not done yet.
Because I don't know MS SQL, it will not be easy to assist, I hope this is
JDBC compliant.
The stored procedures I can test are MySQL stored procedures like described
here:
I would like to use the JDBC river to consume a queue implemented in an
MSSQL server.
I have been given a stored procedure to call that hands me the top 100
items in the queue. I'm given a number of columns as output, and the names
of the columns do not correspond to the names of the fields in
Elasticsearch.
Can anyone give me some adult supervision on how I can (or even IF I CAN)
use the JDBC river to call this SP and properly transform the column names,
as they're coming out of the SP's result set, into the proper field names
in my index?
Well, I can surely help test it out as it becomes ready for consumption,
given a little guidance on usage (being undocumented and all :-)). But
yeah, mapping will be key. Specifically, I have a column coming out of the
SP (the first column, called "domain") that will need to be mapped to the
_id field.
Normally, I'd "SELECT domain AS _id ..." but with an SP, of course, life is
more difficult.
On Monday, August 4, 2014 3:26:20 PM UTC-7, Jörg Prante wrote:
At the moment it is an undocumented (incomplete) feature that can register
field names to callable statement result parameters. You hit the nail - how
to map result set output to field names is not done yet.
Well, I can surely help test it out as it becomes ready for consumption,
given a little guidance on usage (being undocumented and all :-)). But
yeah, mapping will be key. Specifically, I have a column coming out of the
SP (the first column, called "domain") that will need to be mapped to the
_id field.
Normally, I'd "SELECT domain AS _id ..." but with an SP, of course, life
is more difficult.
On Monday, August 4, 2014 3:26:20 PM UTC-7, Jörg Prante wrote:
At the moment it is an undocumented (incomplete) feature that can
register field names to callable statement result parameters. You hit the
nail - how to map result set output to field names is not done yet.
Well, I can surely help test it out as it becomes ready for consumption,
given a little guidance on usage (being undocumented and all :-)). But
yeah, mapping will be key. Specifically, I have a column coming out of the
SP (the first column, called "domain") that will need to be mapped to the
_id field.
Normally, I'd "SELECT domain AS _id ..." but with an SP, of course, life
is more difficult.
On Monday, August 4, 2014 3:26:20 PM UTC-7, Jörg Prante wrote:
At the moment it is an undocumented (incomplete) feature that can
register field names to callable statement result parameters. You hit the
nail - how to map result set output to field names is not done yet.
I'm getting exceptions like the following.
[2014-11-12 13:18:54,489][WARN ][river.jdbc.SimpleRiverSource] can't register out parameter 1 of type varchar
[2014-11-12 13:18:54,489][WARN ][river.jdbc.SimpleRiverSource] can't register out parameter 0 of type int
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.