# Importing CSV to elasticsearch using Logstash

**URL:** <https://discuss.elastic.co/t/importing-csv-to-elasticsearch-using-logstash/115880>\
**Category:** Logstash\
**Created:** [January 17, 2018, 12:21pm UTC](https://discuss.elastic.co/t/importing-csv-to-elasticsearch-using-logstash/115880 "2018-01-17T12:21:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Suryakumar](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@Suryakumar](https://discuss.elastic.co/u/Suryakumar)\
**Post date:** [January 17, 2018, 12:21pm UTC](https://discuss.elastic.co/t/importing-csv-to-elasticsearch-using-logstash/115880/1 "2018-01-17T12:21:30Z")

</div>

Hi,

I am trying to import a CSV file to elasticsearch using Logstash. This is my config file:

```
input { 
      file {
        path => ["/home/suryakumar/Sample.csv"]
        start_position => "beginning"    
      }
    }

    filter {  
      csv {
          separator => ","
          columns => ["CompanyName","Year1","ETR","Debt_Equity_Ratio","Interest","Profit Before Tax","Deferred Tax Liabilities (Net)"]
      } 
    }

    output {  
        elasticsearch {
            action => "index"
            hosts => ["localhost:9200"]
            index => "tax"
        }
        stdout { }
    }

```

while I run Logstash with this config file, I am getting this message.

 ![Logstash_2](https://us1.discourse-cdn.com/elastic/original/3X/f/4/f4d6b06efefe3f54304a0cb66340be3659f5acff.png)

I don't know whether my data imported because I can't see an index named 'tax' in my elasticsearch or in kibana.

Please help me solve this.

Note : I am using Ubuntu 16.04 LTS platform.

Thanks,  
Suryakumar

---

<div class="post-metadata">

**Author:** ![guyboertje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guyboertje/32/31592_2.png) [@guyboertje](https://discuss.elastic.co/u/guyboertje)\
**Post date:** [January 17, 2018, 2:56pm UTC](https://discuss.elastic.co/t/importing-csv-to-elasticsearch-using-logstash/115880/2 "2018-01-17T14:56:20Z")

</div>

Did you run this config before you added the ES output? If so did you see output in the console?

If so, you need to read up on[the `since_db` feature](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html#_tracking_of_current_position_in_watched_files).

---

<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:** [February 14, 2018, 2:56pm UTC](https://discuss.elastic.co/t/importing-csv-to-elasticsearch-using-logstash/115880/3 "2018-02-14T14:56:52Z")

</div>

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