jprante / elasticsearch-jdbc

JDBC importer for Elasticsearch
Apache License 2.0
2.84k stars 709 forks source link

Automatic update of indexes in Elastic Search via JDBC #754

Open awaaziz opened 8 years ago

awaaziz commented 8 years ago

Hello,

I want to update my index ElasticSearch automaticaly, i have a table where the data is stocked, there is a filed nammed time_insertion (when the field was created). so my script is : { "type" : "jdbc", "jdbc" : { "url" : "jdbc:mysql://localhost:3306/test", "user" : "test", "password" : "test", "schedule": "0 0/59 * * * ?", "sql" : [ { "statement" : "select id from matable where \"time_insertion\" > ?", "parameter" : [ "$metrics.lastexecutionstart" ] } ],

    "index" : "testupdat",
    "type" : "mytype"
}

}

but that's not worked for me, Instead of indexing me that recent data we take all table data

Please can you help me ???

cch123 commented 8 years ago

"select id from matable where \"time_insertion\" > ?" => "select id as _id from eatable where xxxxxx"