# Need to index .txt file to elastic search using logstash

**URL:** <https://discuss.elastic.co/t/need-to-index-txt-file-to-elastic-search-using-logstash/153842>\
**Category:** Logstash\
**Created:** [October 24, 2018, 3:32pm UTC](https://discuss.elastic.co/t/need-to-index-txt-file-to-elastic-search-using-logstash/153842 "2018-10-24T15:32:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deepak\_Jaganath](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deepak_jaganath/32/35304_2.png) [@Deepak\_Jaganath](https://discuss.elastic.co/u/Deepak_Jaganath)\
**Post date:** [October 24, 2018, 3:32pm UTC](https://discuss.elastic.co/t/need-to-index-txt-file-to-elastic-search-using-logstash/153842/1 "2018-10-24T15:32:21Z")

</div>

My txt file location is [https://s3.us-east-2.amazonaws.com/elasticbeanstalk-us-east-2-981790547314/Affiliations.txt](https://s3.us-east-2.amazonaws.com/elasticbeanstalk-us-east-2-981790547314/Affiliations.txt)

So technically not an .sql file. Any help in terms of how to configure logstash to ingest / index into elastic search would be greatly appreciated.

My table fields are shown in the image

 ![tabledata](https://us1.discourse-cdn.com/elastic/original/3X/9/9/99f29a698ead796e7da1afdeaf580b80270bbc65.png)

I have created a elastic service in aws how should I index .txt files data to it and perform search

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 24, 2018, 8:54pm UTC](https://discuss.elastic.co/t/need-to-index-txt-file-to-elastic-search-using-logstash/153842/2 "2018-10-24T20:54:58Z")

</div>

You can use an http\_poller input to fetch the file from S3 (or a file input if the file is actually in a local file system), then use a csv filter to split the columns into separate fields, then use an elasticsearch output to ship the resulting documents to Elasticsearch.

---

<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:** [November 21, 2018, 8:54pm UTC](https://discuss.elastic.co/t/need-to-index-txt-file-to-elastic-search-using-logstash/153842/3 "2018-11-21T20:54:58Z")

</div>

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