# Geo\_point write from spark into elasticsearch

**URL:** <https://discuss.elastic.co/t/geo-point-write-from-spark-into-elasticsearch/65126>\
**Category:** Kibana\
**Created:** [November 6, 2016, 9:07am UTC](https://discuss.elastic.co/t/geo-point-write-from-spark-into-elasticsearch/65126 "2016-11-06T09:07:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roberto\_Sancho\_Rojas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roberto_sancho_rojas/32/12999_2.png) [@Roberto\_Sancho\_Rojas](https://discuss.elastic.co/u/Roberto_Sancho_Rojas)\
**Post date:** [November 6, 2016, 9:07am UTC](https://discuss.elastic.co/t/geo-point-write-from-spark-into-elasticsearch/65126/1 "2016-11-06T09:07:44Z")

</div>

Hi:

from spark into elastic i can insert geo\_point fiield like that, but, I cant show that in map on kibana, please anny sugestions??, here the code and pictures:

I tried to insert from diferent form but doesnt work:

ddr1 = df1.select("_").map(lambda line: ('id',{"geo\_sucursal":{"location":{"lon":"41.12","lat":"-71.34"}},'fecha\_creacion': '2016-02-12'}))  
ddr1 = df1.select("_").map(lambda line: ('id',{"geo\_sucursal":{"location":{"lon":41.12,"lat":-71.34}},'fecha\_creacion': '2016-02-12'}))  
ddr1 = df1.select("\*").map(lambda line: ('id',{'location': { 'lat': 41.12,'lon': -71.34},'fecha\_creacion': '2016-02-12'}))

 ![](https://us1.discourse-cdn.com/elastic/original/2X/5/570c6488acc23b2b6dd812ded8f670caf1a4dd94.png)

 ![](https://us1.discourse-cdn.com/elastic/original/2X/d/d422abb84e3e5709e40e538a7ff5103aba0dc444.png)

---

<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:** [November 6, 2016, 3:54pm UTC](https://discuss.elastic.co/t/geo-point-write-from-spark-into-elasticsearch/65126/2 "2016-11-06T15:54:48Z")

</div>

Is the field mapped correctly? [https://www.elastic.co/guide/en/elasticsearch/reference/5.0/geo-point.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/geo-point.html)

---

<div class="post-metadata">

**Author:** ![Roberto\_Sancho\_Rojas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roberto_sancho_rojas/32/12999_2.png) [@Roberto\_Sancho\_Rojas](https://discuss.elastic.co/u/Roberto_Sancho_Rojas)\
**Post date:** [November 6, 2016, 4:21pm UTC](https://discuss.elastic.co/t/geo-point-write-from-spark-into-elasticsearch/65126/3 "2016-11-06T16:21:29Z")

</div>

Hi:

now it working after mapped correctly, but now, the error is beacuse i have  
empty string value for lat and lon, anny suggestion?

Thanks

---

<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:** [December 4, 2016, 4:21pm UTC](https://discuss.elastic.co/t/geo-point-write-from-spark-into-elasticsearch/65126/4 "2016-12-04T16:21:31Z")

</div>

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