Hi,
I would like to connect my DB with ES. My DB has multiple columns such as date, unique ID, and JSON. The JSON column includes multiple JSON code as text or string. Here is an example of value in JSON column:
[ {
"name" : "Alice",
"email" : "alice123@something.com",
"phone" : "123-123-1234",
}, {
"name" : "Bob",
"email" : "bob111@something.com",
"phone" : "123-123-5432",
} ]
So, what I want to do is add value of date column into the JSON code and put the JSON code into ES. For example, if date is 2016/05/20, I wish to put this JSON code into ES:
[ {
"date" : "2016-05-20"
"name" : "Alice",
"email" : "alice123@something.com",
"phone" : "123-123-1234",
}, {
"date" : "2016-05-20"
"name" : "Bob",
"email" : "bob111@something.com",
"phone" : "123-123-5432",
} ]
I want to connect DB with Logstash and doing this combining process through Logstash. I know that there is JDBC input plugin and JSON filter plugin. Also input format for ES is JSON. I think that it is possible to do it but I have no idea how to start it. Even I don't know how can I transfer column value from input part to filter part in Logstash because there is only input JDBC plugin, not filter. If someone has an idea how to do this, could you please explain me? or if you need more detail of this, please let me know.