JDBC River : sipmle strategy, polling & data updates

Hi,

I'm using JDBC River to request structured objects in an Oracle DB. the
point is when the first poll is over, data keeps being inserted at each
round.

I use a request with a join on 3 tables.

curl -XPUT 'localhost:9200/_river/my_eip_river/_meta' -d '{
"type" : "jdbc",
"jdbc" : {
"driver" : "oracle.jdbc.driver.OracleDriver",
"url" : "jdbc:oracle:thin:@10.xxx.xxx.xxx:1521/xxxx",
"strategy" : "simple",
"poll" : "5m",
"user" : "WM_SB92_5510_ADMIN",
"password" : "wmeip2012",
"sql" : "SELECT a from table_a, b from table_b, c from table_c
where a.di =b.id and b.id = c.id"
},
"index" : {
"index" : "jdbc",
"type" : "jdbc"
}
}'

What do I miss ?

Thanks.
Regards,
Yann

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

In the select statement, you should address a column to '_id' to set a
constant ES _id for object reference. Otherwise, ES creates a random id
for you, and rows will get inserted as documents each poll again and again.

Best regards,

Jörg

Am 21.02.13 14:49, schrieb Yann Barraud:

Hi,

I'm using JDBC River to request structured objects in an Oracle DB.
the point is when the first poll is over, data keeps being inserted at
each round.

I use a request with a join on 3 tables.

curl -XPUT 'localhost:9200/_river/my_eip_river/_meta' -d '{
"type" : "jdbc",
"jdbc" : {
"driver" : "oracle.jdbc.driver.OracleDriver",
"url" : "jdbc:oracle:thin:@10.xxx.xxx.xxx:1521/xxxx",
"strategy" : "simple",
"poll" : "5m",
"user" : "WM_SB92_5510_ADMIN",
"password" : "wmeip2012",
"sql" : "SELECT a from table_a, b from table_b, c from table_c
where a.di =b.id and b.id = c.id"
},
"index" : {
"index" : "jdbc",
"type" : "jdbc"
}
}'

What do I miss ?

Thanks.
Regards,
Yann

You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi,

Sorry to have still replied to this.

I have this users table with id, fname, lname and update_date.

I am using this statement

"SELECT *, id AS _id, CONCAT(fname, ' ', lname) AS member_name FROM users
WHERE (create_date BETWEEN DATE_SUB(NOW(), INTERVAL 1 HOUR) AND NOW()) OR
(update_date BETWEEN DATE_SUB(NOW(), INTERVAL 1 HOUR) AND NOW())"

and using strategy => simple, poll => 5s

when I update a row, say the fname. fname before was "George" then I update
it to "Will", it's not updated. Am I missing something here? I have already
set an _id field.

On Tuesday, February 26, 2013 8:08:53 AM UTC+8, Jörg Prante wrote:

In the select statement, you should address a column to '_id' to set a
constant ES _id for object reference. Otherwise, ES creates a random id
for you, and rows will get inserted as documents each poll again and
again.

Best regards,

J?rg

Am 21.02.13 14:49, schrieb Yann Barraud:

Hi,

I'm using JDBC River to request structured objects in an Oracle DB.
the point is when the first poll is over, data keeps being inserted at
each round.

I use a request with a join on 3 tables.

curl -XPUT 'localhost:9200/_river/my_eip_river/_meta' -d '{
"type" : "jdbc",
"jdbc" : {
"driver" : "oracle.jdbc.driver.OracleDriver",
"url" : "jdbc:oracle:thin:@10.xxx.xxx.xxx:1521/xxxx",
"strategy" : "simple",
"poll" : "5m",
"user" : "WM_SB92_5510_ADMIN",
"password" : "wmeip2012",
"sql" : "SELECT a from table_a, b from table_b, c from table_c
where a.di =b.id and b.id = c.id"
},
"index" : {
"index" : "jdbc",
"type" : "jdbc"
}
}'

What do I miss ?

Thanks.
Regards,
Yann

You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.