# Multi-table JDBC Support

**URL:** <https://discuss.elastic.co/t/multi-table-jdbc-support/32173>\
**Category:** Logstash\
**Created:** [October 14, 2015, 12:54pm UTC](https://discuss.elastic.co/t/multi-table-jdbc-support/32173 "2015-10-14T12:54:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jaraxal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaraxal/32/458_2.png) [@Jaraxal](https://discuss.elastic.co/u/Jaraxal)\
**Post date:** [October 14, 2015, 12:54pm UTC](https://discuss.elastic.co/t/multi-table-jdbc-support/32173/1 "2015-10-14T12:54:28Z")

</div>

Does Logstash support using JDBC to pull data from multiple, related tables as a single index? We have data sources that have multiple tables, between 10 and 20. There is always a primary table that has the key used to access related records in the other tables.

Is it possible to use Logstash to pull this data, creating a single record for each row in the main table with the related data from the other table part of the single record? We currently use Python scripts with cx\_Oracle to pull the data using a similar approach. While this functions well technically, it isn't as fast as we would like.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 14, 2015, 12:59pm UTC](https://discuss.elastic.co/t/multi-table-jdbc-support/32173/2 "2015-10-14T12:59:20Z")

</div>

If it's multiple tables within in the same database you can just perform a SQL join, or?

---

<div class="post-metadata">

**Author:** ![Jaraxal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaraxal/32/458_2.png) [@Jaraxal](https://discuss.elastic.co/u/Jaraxal)\
**Post date:** [October 14, 2015, 1:01pm UTC](https://discuss.elastic.co/t/multi-table-jdbc-support/32173/3 "2015-10-14T13:01:54Z")

</div>

No, we can't do a join as it is a one-to-many relationship. With the current Python approach, we are using nested objects in our Elasticsearch template to support the one-to-many relationship.

---

<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:** [July 6, 2017, 5:26am UTC](https://discuss.elastic.co/t/multi-table-jdbc-support/32173/4 "2017-07-06T05:26:35Z")

</div>


