# Reading documents from MongoDB instead of a json file

**URL:** <https://discuss.elastic.co/t/reading-documents-from-mongodb-instead-of-a-json-file/137054>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [June 22, 2018, 3:28pm UTC](https://discuss.elastic.co/t/reading-documents-from-mongodb-instead-of-a-json-file/137054 "2018-06-22T15:28:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![akhil-rane](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@akhil-rane](https://discuss.elastic.co/u/akhil-rane)\
**Post date:** [June 22, 2018, 3:28pm UTC](https://discuss.elastic.co/t/reading-documents-from-mongodb-instead-of-a-json-file/137054/1 "2018-06-22T15:28:50Z")

</div>

Hi All,

I am working on a project where all my documents are stored in MongoDB database. Is there any option in Rally to read documents from mongo instead of a json file?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 22, 2018, 3:42pm UTC](https://discuss.elastic.co/t/reading-documents-from-mongodb-instead-of-a-json-file/137054/2 "2018-06-22T15:42:53Z")

</div>

When you benchmark Elasticsearch you want to make sure Rally is not the bottleneck. Reading from a database sounds a lot slower than processing a file, so I would recommend exporting the data to files before benchmarking.

---

<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 20, 2018, 3:55pm UTC](https://discuss.elastic.co/t/reading-documents-from-mongodb-instead-of-a-json-file/137054/3 "2018-07-20T15:55:45Z")

</div>

Closed on July 20, 2018, 3:55pm UTC

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