# What is the best way to config multiple sql tables in logstash

**URL:** https://discuss.elastic.co/t/what-is-the-best-way-to-config-multiple-sql-tables-in-logstash/62529
**Category:** Logstash
**Created:** [October 7, 2016, 8:11pm UTC](https://discuss.elastic.co/t/what-is-the-best-way-to-config-multiple-sql-tables-in-logstash/62529 "2016-10-07T20:11:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![saisn](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@saisn](https://discuss.elastic.co/u/saisn)
#### Post date: [October 7, 2016, 8:11pm UTC](https://discuss.elastic.co/t/what-is-the-best-way-to-config-multiple-sql-tables-in-logstash/62529/1 "2016-10-07T20:11:29Z")

</div>

Hi,

I've multiple tables in SQL server that needs to be imported to elasticsearch using logstash. So far, I'm doing single conf for single table but it's getting hard to maintain several config files.

Is it better to have multiple events and set all tables in a single logstash configuration file.But, I'm concerned if it will put more load and slow down the import process. Can someone explain how logstash behaves as i'm planning to implement this in production.

Thanks in advance

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 8, 2016, 3:57am UTC](https://discuss.elastic.co/t/what-is-the-best-way-to-config-multiple-sql-tables-in-logstash/62529/2 "2016-10-08T03:57:55Z")

</div>

Having multiple files is no different than one big one, unless you are running multiple LS instances.  
What it does it concatenate all of individual files into a single one at runtime.

---

<div class="post-metadata">

### Author: ![jrcastillo](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@jrcastillo](https://discuss.elastic.co/u/jrcastillo)
#### Post date: [March 7, 2017, 8:17pm UTC](https://discuss.elastic.co/t/what-is-the-best-way-to-config-multiple-sql-tables-in-logstash/62529/3 "2017-03-07T20:17:38Z")

</div>

So basically, for each table in any RDBMS, a single configuration file will have to be created, right ? Is there a more efficient way of doing this ?, like writing in the statement something like:

Select table\_name from information\_schema.tables

and somehow get the table\_names brought up by the query and run the logstash configuration for each table\_name ... ?

---

<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, 4:28am UTC](https://discuss.elastic.co/t/what-is-the-best-way-to-config-multiple-sql-tables-in-logstash/62529/4 "2017-07-06T04:28:02Z")

</div>


