# Load data from SQL server to Elasticsearch with document\_id on local

**URL:** https://discuss.elastic.co/t/load-data-from-sql-server-to-elasticsearch-with-document-id-on-local/273373
**Category:** Logstash
**Created:** [May 19, 2021, 8:11am UTC](https://discuss.elastic.co/t/load-data-from-sql-server-to-elasticsearch-with-document-id-on-local/273373 "2021-05-19T08:11:14Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)
#### Post date: [May 19, 2021, 9:49am UTC](https://discuss.elastic.co/t/load-data-from-sql-server-to-elasticsearch-with-document-id-on-local/273373/6 "2021-05-19T09:49:11Z")

</div>

May be this ?

> [@Using different Index names in Output logstash](https://discuss.elastic.co/t/using-different-index-names-in-output-logstash/273364/):
>
> Hello All , I want to re-use the config lines in output logstash as shown below. I am using if condition but is throwing some error. Please help me out. output { elasticsearch { hosts =\> ["https://XXXXXnet:8200"] user =\> "${es\_usr}" password =\> "${es\_pwd}" if "RequestRouter" in [source] and "VAGAPIEMEA" in [InterfaceName] { index =\> "prodsrvrlog-reqrouter-vagapi-%{log\_day}" } else if "RequestRouter" in [source] …

---

_[View the full topic](https://discuss.elastic.co/t/load-data-from-sql-server-to-elasticsearch-with-document-id-on-local/273373)._
