# Convert field type String to geo\_point

**URL:** <https://discuss.elastic.co/t/convert-field-type-string-to-geo-point/49452>\
**Category:** Elasticsearch\
**Created:** [May 7, 2016, 6:02am UTC](https://discuss.elastic.co/t/convert-field-type-string-to-geo-point/49452 "2016-05-07T06:02:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olalekan\_Elesin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/olalekan_elesin/32/827_2.png) [@Olalekan\_Elesin](https://discuss.elastic.co/u/Olalekan_Elesin)\
**Post date:** [May 7, 2016, 6:02am UTC](https://discuss.elastic.co/t/convert-field-type-string-to-geo-point/49452/1 "2016-05-07T06:02:49Z")

</div>

I use es\_hadoop\_hive to save data into elasticsearch. But I have a field which I formatted as string in hive but the mapping is geo\_point in ES. How can save the data such that the mapping auto generated by hive does not override the geo\_point mapping already created?  
Or is there a way to convert a field type from String to Geo\_point when visualizing in Kibana?

---

<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:** [May 7, 2016, 6:18am UTC](https://discuss.elastic.co/t/convert-field-type-string-to-geo-point/49452/2 "2016-05-07T06:18:09Z")

</div>

> [@Olalekan\_Elesin](#):
>
> How can save the data such that the mapping auto generated by hive does not override the geo\_point mapping already created?

It won't over write what is in ES. Is that what you are seeing?

> [@Olalekan\_Elesin](#):
>
> Or is there a way to convert a field type from String to Geo\_point when visualizing in Kibana?

No, you need to map it correctly in ES.

---

<div class="post-metadata">

**Author:** ![Olalekan\_Elesin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/olalekan_elesin/32/827_2.png) [@Olalekan\_Elesin](https://discuss.elastic.co/u/Olalekan_Elesin)\
**Post date:** [May 7, 2016, 7:37am UTC](https://discuss.elastic.co/t/convert-field-type-string-to-geo-point/49452/3 "2016-05-07T07:37:17Z")

</div>

I did the mapping correctly in ES but anytime I insert into the Hive table that connects to ES, another type is created with the field name as the same but fieldtype as string.

---

<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:** [May 7, 2016, 7:42am UTC](https://discuss.elastic.co/t/convert-field-type-string-to-geo-point/49452/4 "2016-05-07T07:42:08Z")

</div>

Maybe if you post your mappings we can comment further.

---

<div class="post-metadata">

**Author:** ![ChAkO](https://avatars.discourse-cdn.com/v4/letter/c/45deac/32.png) [@ChAkO](https://discuss.elastic.co/u/ChAkO)\
**Post date:** [November 6, 2016, 12:15am UTC](https://discuss.elastic.co/t/convert-field-type-string-to-geo-point/49452/5 "2016-11-06T00:15:42Z")

</div>

I have the same problem  
I need to convert a string coordinates to geo\_point type to visualize in kibana correctly.  
I've tried to convert this field in the hive script, it's possible?

CREATE EXTERNAL TABLE hive\_to\_es\_table  
(  
id string,  
geo\_coordinates string  
)  
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'  
TBLPROPERTIES('es.resource' = 'my\_index/my\_type',  
'[es.mapping.id](http://es.mapping.id)' = 'id',  
'es.mapping.names' = 'geo\_coordinates:@geo\_point',  
'es.nodes' = 'minode.corp');

I have not gotten it.  
Can anybody help me?  
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:** [November 6, 2016, 12:16am UTC](https://discuss.elastic.co/t/convert-field-type-string-to-geo-point/49452/6 "2016-11-06T00:16:08Z")

</div>

You should start your own thread over in the Hadoop category 🙂

---

<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 5, 2017, 10:06pm UTC](https://discuss.elastic.co/t/convert-field-type-string-to-geo-point/49452/7 "2017-07-05T22:06:20Z")

</div>


