# Tracking\_column not found in dataset when using JDBC driver with mongodb (input)

**URL:** <https://discuss.elastic.co/t/tracking-column-not-found-in-dataset-when-using-jdbc-driver-with-mongodb-input/246706>\
**Category:** Logstash\
**Created:** [August 28, 2020, 3:27am UTC](https://discuss.elastic.co/t/tracking-column-not-found-in-dataset-when-using-jdbc-driver-with-mongodb-input/246706 "2020-08-28T03:27:13Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![timgau](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timgau/32/75017_2.png) [@timgau](https://discuss.elastic.co/u/timgau)\
**Post date:** [September 2, 2020, 5:00am UTC](https://discuss.elastic.co/t/tracking-column-not-found-in-dataset-when-using-jdbc-driver-with-mongodb-input/246706/6 "2020-09-02T05:00:58Z")

</div>

I ended up using the Elasticsearch output to specify my 'mongoid' field

```auto
output {
  elasticsearch {
    hosts => ["http://localhost:9200"]
    index => "edb"
    #user => "elastic"
    #password => "changeme"
	doc_as_upsert => true
	document_id => "%{[document][mongo_id]}"

  }
}

```

info

> [@How to create my own document\_id in logstash?](https://discuss.elastic.co/t/how-to-create-my-own-document-id-in-logstash/1416):
>
> I would like to create my own document\_id to avoid duplication. I would like to make the document\_id as an MD5 hash of two fields; "ip" and "sha1\_fingerprint". eg; in pseudo code: md5\_hex( "ip" + " sha1\_fingerprint" ) Thanks

Got the idea from this brilliant page By [Sakina Shaikh](https://www.blogger.com/profile/02868992439744194610)

> **[Push MongoDB data to ElasticSearch through Logstash](https://javasupportzone.blogspot.com/2018/06/mongodb-data-to-elasticsearch-through.html)**
>
> Perform below Steps: 1. Download UnityJDBC\_Trial\_Install.jar from http://unityjdbc.com/download.php Note: This is a 30-day trial ...

---

_[View the full topic](https://discuss.elastic.co/t/tracking-column-not-found-in-dataset-when-using-jdbc-driver-with-mongodb-input/246706)._
