# Indexing multiple tables from MySQL/MSSQL in one config-file

**URL:** <https://discuss.elastic.co/t/indexing-multiple-tables-from-mysql-mssql-in-one-config-file/47900>\
**Category:** Logstash\
**Created:** [April 20, 2016, 11:17am UTC](https://discuss.elastic.co/t/indexing-multiple-tables-from-mysql-mssql-in-one-config-file/47900 "2016-04-20T11:17:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PascalR](https://avatars.discourse-cdn.com/v4/letter/p/258eb7/32.png) [@PascalR](https://discuss.elastic.co/u/PascalR)\
**Post date:** [April 20, 2016, 11:17am UTC](https://discuss.elastic.co/t/indexing-multiple-tables-from-mysql-mssql-in-one-config-file/47900/1 "2016-04-20T11:17:48Z")

</div>

Hi everyone,

my task is to put our (in this case MySQL) tables into elastics search.  
I made a config for one table and it worked really well. The problem is, that I have not one or two tables, but over 100.

So my idea is to index all and schedule them with only one config file using the **statement\_filepath** to go over all statements for each table.

To get the output right, I thought I can use the **metadata** from each table to generate the index, document\_type and document\_id. For Example:

> index =\> " TABLENAME + 's' "  
> document\_type =\> " TABLENAME "  
> document\_id =\> "TABLE PRIMARY KEY"

Is this even possible or is there even a better solution to put all of my data in ES?

Thanks for your help!

---

<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:01am UTC](https://discuss.elastic.co/t/indexing-multiple-tables-from-mysql-mssql-in-one-config-file/47900/2 "2017-07-06T05:01:25Z")

</div>


