# Data from CSV is not inserting to Elastic search using Logstash

**URL:** <https://discuss.elastic.co/t/data-from-csv-is-not-inserting-to-elastic-search-using-logstash/200176>\
**Category:** Logstash\
**Created:** [September 19, 2019, 10:14am UTC](https://discuss.elastic.co/t/data-from-csv-is-not-inserting-to-elastic-search-using-logstash/200176 "2019-09-19T10:14:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SudevPK](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@SudevPK](https://discuss.elastic.co/u/SudevPK)\
**Post date:** [September 19, 2019, 10:14am UTC](https://discuss.elastic.co/t/data-from-csv-is-not-inserting-to-elastic-search-using-logstash/200176/1 "2019-09-19T10:14:46Z")

</div>

Data is not Inserting to Elastic search using LogStash

**Config**

```
input {
file {
path => ["C:\PR Files\Test\Account1.csv"]
start_position => "beginning"
sincedb_path => "nul"
}
}
filter {
csv {
separator => "|"
columns => ["RPT_ID","CAND_ID"]
}
}

output {

elasticsearch { 
hosts => ["localhost:9200"]
index => "qwer"
}
stdout { }
}

```

**Data in CSV**

```
RPT_ID|CAND_ID
QWER123|450564

```

**Logs**

```
[2019-09-19T15:47:09,566][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-09-19T15:47:09,584][INFO][logstash.runner] Starting Logstash {"logstash.version"=>"7.3.2"}
[2019-09-19T15:47:10,885][INFO][org.reflections.Reflections] Reflections took 28 ms to scan 1 urls, producing 19 keys and 39 values 
[2019-09-19T15:47:12,849][INFO][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://localhost:9200/]}}
[2019-09-19T15:47:12,994][WARN][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>"http://localhost:9200/"}
[2019-09-19T15:47:13,036][INFO][logstash.outputs.elasticsearch] ES Output version determined {:es_version=>7}
[2019-09-19T15:47:13,039][WARN][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document _type {:es_version=>7}
[2019-09-19T15:47:13,060][INFO][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["//localhost:9200"]}
[2019-09-19T15:47:13,116][INFO][logstash.outputs.elasticsearch] Using default mapping template
[2019-09-19T15:47:13,170][INFO][logstash.outputs.elasticsearch] Attempting to install template {:manage_template=>{"index_patterns"=>"logstash-*", "version"=>60001, "settings"=>{"index.refresh_interval"=>"5s", "number_of_shards"=>1}, "mappings"=>{"dynamic_templates"=>[{"message_field"=>{"path_match"=>"message", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false}}}, {"string_fields"=>{"match"=>"*", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false, "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}}}}], "properties"=>{"@timestamp"=>{"type"=>"date"}, "@version"=>{"type"=>"keyword"}, "geoip"=>{"dynamic"=>true, "properties"=>{"ip"=>{"type"=>"ip"}, "location"=>{"type"=>"geo_point"}, "latitude"=>{"type"=>"half_float"}, "longitude"=>{"type"=>"half_float"}}}}}}}
[2019-09-19T15:47:13,178][WARN][org.logstash.instrument.metrics.gauge.LazyDelegatingGauge] A gauge metric of an unknown type (org.jruby.specialized.RubyArrayOneObject) has been create for key: cluster_uuids. This may result in invalid serialization. It is recommended to log an issue to the responsible developer/development team.
[2019-09-19T15:47:13,192][INFO][logstash.javapipeline] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>4, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50, "pipeline.max_inflight"=>500, :thread=>"#<Thread:0x3c2bb460 run>"}
[2019-09-19T15:47:13,603][INFO][logstash.javapipeline] Pipeline started {"pipeline.id"=>"main"}
[2019-09-19T15:47:13,685][INFO][logstash.agent] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2019-09-19T15:47:13,717][INFO][filewatch.observingtail] START, creating Discoverer, Watch with file and sincedb collections
[2019-09-19T15:47:14,052][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=>9600}
```

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [September 19, 2019, 2:39pm UTC](https://discuss.elastic.co/t/data-from-csv-is-not-inserting-to-elastic-search-using-logstash/200176/2 "2019-09-19T14:39:34Z")

</div>

Do not use backslash in the path option of a file input, use forward slash.

---

<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:** [October 17, 2019, 2:39pm UTC](https://discuss.elastic.co/t/data-from-csv-is-not-inserting-to-elastic-search-using-logstash/200176/3 "2019-10-17T14:39:36Z")

</div>

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