# Is there any way to check if SQL result data (unique id) already exists in ES document type (as a document\_id) when i insert data by using logstash?

**URL:** <https://discuss.elastic.co/t/is-there-any-way-to-check-if-sql-result-data-unique-id-already-exists-in-es-document-type-as-a-document-id-when-i-insert-data-by-using-logstash/69101>\
**Category:** Logstash\
**Created:** [December 15, 2016, 2:07am UTC](https://discuss.elastic.co/t/is-there-any-way-to-check-if-sql-result-data-unique-id-already-exists-in-es-document-type-as-a-document-id-when-i-insert-data-by-using-logstash/69101 "2016-12-15T02:07:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanimoto](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@tanimoto](https://discuss.elastic.co/u/tanimoto)\
**Post date:** [December 15, 2016, 2:07am UTC](https://discuss.elastic.co/t/is-there-any-way-to-check-if-sql-result-data-unique-id-already-exists-in-es-document-type-as-a-document-id-when-i-insert-data-by-using-logstash/69101/1 "2016-12-15T02:07:06Z")

</div>

> **[INSERT INTO LOGSTASH SELECT DATA FROM DATABASE
	  	 | Elastic](https://www.elastic.co/blog/logstash-jdbc-input-plugin)**
>
> Ever want to search your database entities from Elasticsearch? Now you can use Logstash to do just that! In this blog we introduce the JDBC input, which has been created to import data ...

found solution by myself.

---

<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:** [January 12, 2017, 2:07am UTC](https://discuss.elastic.co/t/is-there-any-way-to-check-if-sql-result-data-unique-id-already-exists-in-es-document-type-as-a-document-id-when-i-insert-data-by-using-logstash/69101/2 "2017-01-12T02:07:28Z")

</div>

Closed on January 12, 2017, 2:07am UTC

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