# Struggling with mutate - not uploading after conversion

**URL:** <https://discuss.elastic.co/t/struggling-with-mutate-not-uploading-after-conversion/70329>\
**Category:** Logstash\
**Created:** [January 2, 2017, 12:59am UTC](https://discuss.elastic.co/t/struggling-with-mutate-not-uploading-after-conversion/70329 "2017-01-02T00:59:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Msaxton](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@Msaxton](https://discuss.elastic.co/u/Msaxton)\
**Post date:** [January 2, 2017, 12:59am UTC](https://discuss.elastic.co/t/struggling-with-mutate-not-uploading-after-conversion/70329/1 "2017-01-02T00:59:15Z")

</div>

Hello all,

I am _brand new_ to Elastic and working with a CSV. After my initial upload, everything converted to strings so I used mutate to convert. However, my file no longer uploads. I've gone through all the manuals I can and still can't find what's wrong.

I'm open to any suggestions and directions to other places to research how to fix this.

Thank you so much.

```
input {
file {
  path => "/Users/mike/fia/test/*.csv"
  start_position => "beginning"
  sincedb_path => "dev/null"}
  }

filter
  {
    csv
      {
    separator => ","
        columns => [
        "General Offense Number",
        "Event Clearance Group",
        "Event Clearance Date",
        "District/Sector"
        "Longitude",
        "Latitude",
        "Initial Type Group",
        "At Scene Time"]
    remove_field => ["message"]
    }

  mutate {
     convert => {
    "General Offense Number" => "integer",
    "Event Clearance Group" => "string",
    "District/Sector" => "string",
    "Longitude" => "geopoint.lon",
    "Latitude" => "geopoint.lat",
    "Initial Type Group" => "string"
    "At Scene Time"]
    }
  }
   
date {
match => ["Event Clearance Data", "MM/dd/yyyy hh:mm"
    match => "At Scene Time" = "MM/dd/yyyy HH:mm"]
}
}

 output
  {
     elasticsearch
      {
        hosts => "http://localhost:9200"
    index => "index4"
      }
    stdout {}
   }
```

---

<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:** [January 2, 2017, 1:51am UTC](https://discuss.elastic.co/t/struggling-with-mutate-not-uploading-after-conversion/70329/2 "2017-01-02T01:51:10Z")

</div>

If there is nothing in stdout then it's probably;

> [@Msaxton](#):
>
> sincedb\_path =\> "dev/null"}

Add another `/` at the start of the path.

---

<div class="post-metadata">

**Author:** ![Msaxton](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@Msaxton](https://discuss.elastic.co/u/Msaxton)\
**Post date:** [January 10, 2017, 2:21am UTC](https://discuss.elastic.co/t/struggling-with-mutate-not-uploading-after-conversion/70329/3 "2017-01-10T02:21:39Z")

</div>

Ok, I added the "/" and still am getting the error.

I've been doing some research on date handling and I think that's where it is getting thrown off.

```
input {
file {
path => "/Users/mike/fia/test/*.csv"
start_position => "beginning"
sincedb_path => "/dev/null"}
  }

filter
{
csv
  {
separator => ","
    columns => [
    "General Offense Number",
    "Event Clearance Group",
    "Event Clearance Date",
    "District/Sector",
    "Longitude",
    "Latitude",
    "Initial Type Group",
    "At Scene Time"]
remove_field => ["message"]
}
  
mutate {
convert => {
"General Offense Number" => "integer"
"Event Clearance Group" => "string"
"District/Sector" => "string"
"Longitude" => "geopoint.lon"
"Latitude" => "geopoint.lat"
"Initial Type Group" => "string"
}
}

date {
match => ["Event Clearance Date", "MM/dd/YY HH:mm:ss"]
match => ["At Scene Time", "MM/dd/YY HH:mm:ss”]
}
}

output
{
elasticsearch
  {
    hosts => "http://localhost:9200"
      index => "test"
  }
stdout {}
}

```

Every time I load the .conf I get an error saying  
"`[2017-01-09T20:09:14,623][ERROR][logstash.agent] fetched an invalid config {:......(edited)..... reason=>"Expected one of #, {, ,, ] at line 46, column 19 (byte 893) after filter`

I am 100% lost. Any help or direction would be appreciated. Thanks!

---

<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:** [January 10, 2017, 2:32am UTC](https://discuss.elastic.co/t/struggling-with-mutate-not-uploading-after-conversion/70329/4 "2017-01-10T02:32:46Z")

</div>

Line 46 - `hosts => "http://localhost:9200"`

Yet the docs say it's an array - [https://www.elastic.co/guide/en/logstash/5.1/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-hosts](https://www.elastic.co/guide/en/logstash/5.1/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-hosts)

---

<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 7, 2017, 2:32am UTC](https://discuss.elastic.co/t/struggling-with-mutate-not-uploading-after-conversion/70329/5 "2017-02-07T02:32:48Z")

</div>

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