Elasticsearch and sql tables

I have data stored in a sql table that i would like to load into elasticsearch.
What would be the best way to do this.
The table is updated frequently and i need elasticsearch to reflect this.


Logstash has a JDBC input you could use to pull data from the table periodically.

Otherwise you should consider writing to both the DB and Elasticsearch at the same time, if you want more real time updates.

1 Like

What about using filebeats as it seems to be more lightweight?
I could then export the db data to a flat file on a regular basis.

That could work.

In order to stop data duplication would i need to make the document_id a primary key to replicate the sql table pk?



This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.