# How to connect SQL data to elasticsearch without using logstash but something else like apache kafka,and spark

**URL:** <https://discuss.elastic.co/t/how-to-connect-sql-data-to-elasticsearch-without-using-logstash-but-something-else-like-apache-kafka-and-spark/213795>\
**Category:** Elasticsearch\
**Created:** [January 5, 2020, 9:15am UTC](https://discuss.elastic.co/t/how-to-connect-sql-data-to-elasticsearch-without-using-logstash-but-something-else-like-apache-kafka-and-spark/213795 "2020-01-05T09:15:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![joseph\_muchoki](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joseph_muchoki/32/60291_2.png) [@joseph\_muchoki](https://discuss.elastic.co/u/joseph_muchoki)\
**Post date:** [January 5, 2020, 9:15am UTC](https://discuss.elastic.co/t/how-to-connect-sql-data-to-elasticsearch-without-using-logstash-but-something-else-like-apache-kafka-and-spark/213795/1 "2020-01-05T09:15:52Z")

</div>

i want to connect mysql (relational database) data into elasticsearch without using logstash but instead use message brokers like apache kafka and spark. What is the procedure? am checking most tutorials,they are broken. whats the simplest way to do it

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 5, 2020, 9:36am UTC](https://discuss.elastic.co/t/how-to-connect-sql-data-to-elasticsearch-without-using-logstash-but-something-else-like-apache-kafka-and-spark/213795/2 "2020-01-05T09:36:57Z")

</div>

Welcome.

I shared most of my thoughts there: [http://david.pilato.fr/blog/2015/05/09/advanced-search-for-your-legacy-application/](http://david.pilato.fr/blog/2015/05/09/advanced-search-for-your-legacy-application/)

Basically, I'd recommend modifying the application layer if possible and send data to elasticsearch in the same "transaction" as you are sending your data to the database.

---

<div class="post-metadata">

**Author:** ![joseph\_muchoki](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joseph_muchoki/32/60291_2.png) [@joseph\_muchoki](https://discuss.elastic.co/u/joseph_muchoki)\
**Post date:** [January 5, 2020, 9:44am UTC](https://discuss.elastic.co/t/how-to-connect-sql-data-to-elasticsearch-without-using-logstash-but-something-else-like-apache-kafka-and-spark/213795/3 "2020-01-05T09:44:54Z")

</div>

let me go through it. Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 2, 2020, 9:45am UTC](https://discuss.elastic.co/t/how-to-connect-sql-data-to-elasticsearch-without-using-logstash-but-something-else-like-apache-kafka-and-spark/213795/4 "2020-02-02T09:45:06Z")

</div>

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