Open ksdpmx opened 9 years ago
Changing the statement
above to "statement": "SELECT id AS _id, last_active_begin, unix_timestamp FROM table WHERE last_active_begin >= ?
solves the problem...
UNIX_TIMESTAMP
, FROM_UNIXTIME
cannot be used in sql
?
ES v1.3.4
ps: FROM_UNIXTIME
can be used in ES v1.3.6...
According to the manual, I did a small test.
My db.table is:
id last_active_begin unix_timestamp 1 2014-12-11 00:40:15.000 1418029615 2 2014-12-11 01:48:45.000 1418062525 3 2014-12-11 01:49:15.000 1418062555 4 2014-12-11 01:49:45.000 1418062585
$river.state.last_active_begin
is2014-12-11T03:14:10.855Z
.last_active_begin
andunix_timestamp
are nonsense and have no relations. And I imported the db.table data to elasticsearch db.table.Then I add a row in MySQL manually:
5 2014-12-12 00:00.00.000 1518062585
,curl -XPOST localhost:9200/_river/incremental/_meta -d @incremental.json
:elasticsearch.log
returns:Also, I've tried to work around by changing
unix_timestamp
tolast_update_active
with a completely clean ES:Still got nothing.
Why I cannot get any results? Thank you.
ES v1.3.4, elasticsearch-river-jdbc v1.3.4.4, jdbc v5.1.33.
ps: manual
"statement" : "select * from \"products\" where \"mytimestamp\" > ?"
, there's no need to add quotations inmytimestamp
.