# How to merge lon lat for geo\_point

**URL:** <https://discuss.elastic.co/t/how-to-merge-lon-lat-for-geo-point/128584>\
**Category:** Logstash\
**Created:** [April 18, 2018, 5:20pm UTC](https://discuss.elastic.co/t/how-to-merge-lon-lat-for-geo-point/128584 "2018-04-18T17:20:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tdasch](https://avatars.discourse-cdn.com/v4/letter/t/58f4c7/32.png) [@tdasch](https://discuss.elastic.co/u/tdasch)\
**Post date:** [April 18, 2018, 5:20pm UTC](https://discuss.elastic.co/t/how-to-merge-lon-lat-for-geo-point/128584/1 "2018-04-18T17:20:31Z")

</div>

ES and LS 6.2. My first post, I apologize if my formatting is incorrect in anyway. Attempting to merge lon lat for geo\_points I can visualize in Kibana. Below is my config file for LS and the error I am receiving. Of note, If I remove the mutate=\>rename filter, the csv file is ingested.

```
input {
        file {
                path => "/home/tdasch/address.csv"
                start_position => "beginning"
                sincedb_path => "/dev/null"
        }
}
filter {
        csv {
                separator => ","
                columns => ["client_number", "latitude", "longitude"]
        }
        mutate {
                convert => { "latitude" => "float" }
                convert => { "longitude" => "float" }
        }
        mutate {
                rename => {
                        "latitude" => "[location][lat]"
                        "longitude" => "[location][lon]"
        }
}
output {
        elasticsearch {
                hosts => "localhost:9200"
                index => "address"
                document_type => "client_address"
        }
        stdout {}
}

```

`[ERROR] 2018-04-18 12:52:57.676 [Ruby-0-Thread-1: /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:22] agent - Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message =>"Expected one of #, => at line 24, column 16 (byte 433) after filter {\n\tcsv {\n\t\tseparator => \",\"\n\t\tcolumns => [\"client_number\ ", \"latitude\", \"longitude\"]\n\t}\n\tmutate {\n\t\tconvert => { \"latitude\" => \"float\" }\n\t\tconvert => { \"longitude\" => \"float\" }\n\t}\n\tmutate {\n\t\trename => {\n\t\t\t\"latitude\" => \"[location][lat]\"\n\t\t\t\"longitude\" => \"[location][lon]\"\n\t}\n}\noutput {\n\telasticsearch ", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:42:in`compile\_imperative'", "/usr/share/logs tash/logstash-core/lib/logstash/compiler.rb:50:in `compile_graph'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:12:in`block in compile\_sources'", "org/jruby/RubyArray.java:2486:in `map'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:11:in`compile\_ sources'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:51:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/ pipeline.rb:169:in`initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline\_action/create.rb:40:in `execute'", "/usr/share/lo gstash/logstash-core/lib/logstash/agent.rb:315:in`block in converge\_state'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:141:i n `with_pipelines'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:312:in`block in converge\_state'", "org/jruby/RubyArray.java:1 734:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:299:in`converge\_state'", "/usr/share/logstash/logstash-core/lib/lo gstash/agent.rb:166:in `block in converge_state_and_update'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:141:in`with\_pipeline s'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:164:in `converge_state_and_update'", "/usr/share/logstash/logstash-core/lib/lo gstash/agent.rb:90:in`execute'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:348:in `block in execute'", "/usr/share/logstash /vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:24:in`block in initialize'"]}`

---

<div class="post-metadata">

**Author:** ![atira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atira/32/28699_2.png) [@atira](https://discuss.elastic.co/u/atira)\
**Post date:** [April 18, 2018, 7:31pm UTC](https://discuss.elastic.co/t/how-to-merge-lon-lat-for-geo-point/128584/2 "2018-04-18T19:31:11Z")

</div>

> "LogStash::ConfigurationError", :message =\>"Expected one of #, =\> at line 24

You forgot to close the rename operation, ie. you're missing one closing brace.

```auto
mutate {
                rename => {
                        "latitude" => "[location][lat]"
                        "longitude" => "[location][lon]"
        }

```

2 opening and one closing braces.

---

<div class="post-metadata">

**Author:** ![tdasch](https://avatars.discourse-cdn.com/v4/letter/t/58f4c7/32.png) [@tdasch](https://discuss.elastic.co/u/tdasch)\
**Post date:** [April 19, 2018, 10:54am UTC](https://discuss.elastic.co/t/how-to-merge-lon-lat-for-geo-point/128584/3 "2018-04-19T10:54:58Z")

</div>

How embarrassing 🙂 Thank you for pointing that out - don't know why I didn't see that after staring at it for an hour. Thanks Attila!

---

<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:** [May 17, 2018, 10:55am UTC](https://discuss.elastic.co/t/how-to-merge-lon-lat-for-geo-point/128584/4 "2018-05-17T10:55:01Z")

</div>

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