# Failed to convert the data type from string to float

**URL:** https://discuss.elastic.co/t/failed-to-convert-the-data-type-from-string-to-float/126175
**Category:** Logstash
**Created:** [March 30, 2018, 2:04am UTC](https://discuss.elastic.co/t/failed-to-convert-the-data-type-from-string-to-float/126175 "2018-03-30T02:04:11Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![terrymu](https://avatars.discourse-cdn.com/v4/letter/t/ea666f/32.png) [@terrymu](https://discuss.elastic.co/u/terrymu)
#### Post date: [March 30, 2018, 5:38am UTC](https://discuss.elastic.co/t/failed-to-convert-the-data-type-from-string-to-float/126175/3 "2018-03-30T05:38:28Z")

</div>

I have do three actions,

1. I saw a similar issue and split the add\_field and convert into two mutates function.

> [@Convert String to float failed](https://discuss.elastic.co/t/convert-string-to-float-failed/32232/2):
>
> I also tried: convert =\> ["geoip.location", "float"] it doesn't works, either.

1. using the convert code format as you mentioned.

2. when the data fed completely, refresh the log pattern

 ![elk6](https://us1.discourse-cdn.com/elastic/original/3X/5/1/519d5a17ada14e8d578c620bc09e196aaea54af0.png)

Then, the convert is working well !!!!!!!!!!! it blocks me a long time!.

 ![elk7](https://us1.discourse-cdn.com/elastic/original/3X/5/0/5012245847b4df4dd577987d50d3d015457d4428.png)  
 ![elk8](https://us1.discourse-cdn.com/elastic/original/3X/7/a/7abbabd81c956aa8e72c65b0d8df9b373816fa13.png)

---

_[View the full topic](https://discuss.elastic.co/t/failed-to-convert-the-data-type-from-string-to-float/126175)._
