# Not able to import complete data using Logstash to Elasticsearch

**URL:** <https://discuss.elastic.co/t/not-able-to-import-complete-data-using-logstash-to-elasticsearch/75825>\
**Category:** Logstash\
**Created:** [February 21, 2017, 6:21am UTC](https://discuss.elastic.co/t/not-able-to-import-complete-data-using-logstash-to-elasticsearch/75825 "2017-02-21T06:21:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Varun\_Patel](https://avatars.discourse-cdn.com/v4/letter/v/57b2e6/32.png) [@Varun\_Patel](https://discuss.elastic.co/u/Varun_Patel)\
**Post date:** [February 21, 2017, 6:21am UTC](https://discuss.elastic.co/t/not-able-to-import-complete-data-using-logstash-to-elasticsearch/75825/1 "2017-02-21T06:21:55Z")

</div>

Hi,

I am using Logstash with JDBC connection for importing data from database to elasticsearch.

When i am importing data, all the data present in database is not imported.

There are 487745 records in my database but when i see the elasticsearch, i hardly get few data.

Please suggest a way. I am also attaching my logstash config file through which i am doing this.

 ![](https://us1.discourse-cdn.com/elastic/original/2X/e/e63563ddee15f9d2e86942c4693b79a481734400.PNG)

---

<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:** [February 21, 2017, 7:43am UTC](https://discuss.elastic.co/t/not-able-to-import-complete-data-using-logstash-to-elasticsearch/75825/2 "2017-02-21T07:43:57Z")

</div>

Please don't post pictures of text, they are difficult to read and some people may not be even able to see them.

> [@Varun\_Patel](#):
>
> There are 487745 records in my database but when i see the elasticsearch, i hardly get few data.

How many? What's in your logs?

---

<div class="post-metadata">

**Author:** ![Varun\_Patel](https://avatars.discourse-cdn.com/v4/letter/v/57b2e6/32.png) [@Varun\_Patel](https://discuss.elastic.co/u/Varun_Patel)\
**Post date:** [February 21, 2017, 9:03am UTC](https://discuss.elastic.co/t/not-able-to-import-complete-data-using-logstash-to-elasticsearch/75825/3 "2017-02-21T09:03:18Z")

</div>

ok sure. Will not send picture of text.

10 - 15 data.

No Error log is gererated.

---

<div class="post-metadata">

**Author:** ![Varun\_Patel](https://avatars.discourse-cdn.com/v4/letter/v/57b2e6/32.png) [@Varun\_Patel](https://discuss.elastic.co/u/Varun_Patel)\
**Post date:** [February 22, 2017, 10:36am UTC](https://discuss.elastic.co/t/not-able-to-import-complete-data-using-logstash-to-elasticsearch/75825/4 "2017-02-22T10:36:47Z")

</div>

Hi @warkolm,

It was mistake from my end. Actually i was importing huge amount of data i.e. Approx 5 lac. So it is taking nearly 1.5hr time to load in to elasticsearch.

So in between i was closing up the command prompt so whole bunch of data was not loading.

---

<div class="post-metadata">

**Author:** ![tausif786](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@tausif786](https://discuss.elastic.co/u/tausif786)\
**Post date:** [February 22, 2017, 8:11pm UTC](https://discuss.elastic.co/t/not-able-to-import-complete-data-using-logstash-to-elasticsearch/75825/5 "2017-02-22T20:11:58Z")

</div>

Hello,  
Try by adding  
document\_id =\> "%{primary\_key}" below document\_type

---

<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:** [March 22, 2017, 8:12pm UTC](https://discuss.elastic.co/t/not-able-to-import-complete-data-using-logstash-to-elasticsearch/75825/6 "2017-03-22T20:12:00Z")

</div>

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