# Loading a .csv file into Elasticsearch using Logstash

**URL:** <https://discuss.elastic.co/t/loading-a-csv-file-into-elasticsearch-using-logstash/56128>\
**Category:** Logstash\
**Created:** [July 21, 2016, 5:49pm UTC](https://discuss.elastic.co/t/loading-a-csv-file-into-elasticsearch-using-logstash/56128 "2016-07-21T17:49:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![puja.jena](https://avatars.discourse-cdn.com/v4/letter/p/d26b3c/32.png) [@puja.jena](https://discuss.elastic.co/u/puja.jena)\
**Post date:** [July 21, 2016, 5:49pm UTC](https://discuss.elastic.co/t/loading-a-csv-file-into-elasticsearch-using-logstash/56128/1 "2016-07-21T17:49:19Z")

</div>

Hi, I'm trying to import this one CSV file to Elasticsearch using Logstash, but it seems to be failing despite the fact that my configuration file is okay. My .conf file in Elasticsearch looks like the following:

```
input {
    file {
        path => "/Users/puja.jena/Desktop/TrendingData6.csv"
        type => "perf"
        sincedb_path => "/Users/puja.jena/ElkData/.sincedb_test2"        
         }
}

filter {
        csv {
            columns => ["date","tenant_n","Total_Count","Tasks_above_threshold","Score","Total_Tasks","Task_Score","year"]
            separator => ","
       }

    date {
        match => ["date", "yyyy-MM-dd HH:mm:ss"]
        target => "@timestamp"
        timezone => "UTC"
         }

    mutate {
        convert => {"Total_Count" => "integer"}
        convert => {"Tasks_above_threshold" => "integer"}
        convert => {"Score" => "float"}
        convert => {"Total_Tasks" => "integer"}
        convert => {"Task_Score" => "integer"}
        convert => {"year" => "integer"}      
           }
}

output {  
    elasticsearch {
        action => "index"
        hosts => ["localhost:9200"]
        index => "logstash-trendingScore"
        workers => 1
    }
}

```

When I run "bin/logstash -f bin/logstashConfig.conf --configtest", it returns "Configuration OK". When I run "bin/logstash -f bin/logstashConfig.conf --verbose", I have no errors as well. However, when I use the Kopf plugin to view my loaded indices, none appear. Is there something that I am missing?

---

<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:** [July 22, 2016, 2:24am UTC](https://discuss.elastic.co/t/loading-a-csv-file-into-elasticsearch-using-logstash/56128/2 "2016-07-22T02:24:44Z")

</div>

Have you removed the `sincedb` file?

---

<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:** [July 22, 2016, 8:48am UTC](https://discuss.elastic.co/t/loading-a-csv-file-into-elasticsearch-using-logstash/56128/3 "2016-07-22T08:48:21Z")

</div>

If the input file is older than 24 hours you need to adjust the `ignore_older` option.

---

<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 6, 2017, 4:46am UTC](https://discuss.elastic.co/t/loading-a-csv-file-into-elasticsearch-using-logstash/56128/4 "2017-07-06T04:46:52Z")

</div>


