# Float type issue, should it be resolved at the ingestion process or before?

**URL:** https://discuss.elastic.co/t/float-type-issue-should-it-be-resolved-at-the-ingestion-process-or-before/159174
**Category:** Logstash
**Created:** [December 3, 2018, 12:38pm UTC](https://discuss.elastic.co/t/float-type-issue-should-it-be-resolved-at-the-ingestion-process-or-before/159174 "2018-12-03T12:38:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![lightonseo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lightonseo/32/38366_2.png) [@lightonseo](https://discuss.elastic.co/u/lightonseo)
#### Post date: [December 3, 2018, 12:38pm UTC](https://discuss.elastic.co/t/float-type-issue-should-it-be-resolved-at-the-ingestion-process-or-before/159174/1 "2018-12-03T12:38:03Z")

</div>

Hello,

I have some problems with floats. The data is coming from a csv file and the source looks like that

```
"name","avg_rank"
"richard","1,65"
"john","8,34"
"dan","0,78"
"alicia","14,659"

```

Now, because elasticsearch was treating avg\_rank values as strings, I've done something like that in my logstash config file :

`mutate { convert => {"avg_rank" => "float"} }`

Looking into the hits quering , I can see for example that avg\_rank value for john is 834.0 instead of 8.34

```
{
	"name": "john"
	"avg_rank" : 834.0
}

```

Could this be resolved only upstream working on my data source (replacing commas by dots for example) or is there ways to make logstash dealing with it ?

Thank you ! 🙂

---

<div class="post-metadata">

### Author: ![lightonseo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lightonseo/32/38366_2.png) [@lightonseo](https://discuss.elastic.co/u/lightonseo)
#### Post date: [December 3, 2018, 8:22pm UTC](https://discuss.elastic.co/t/float-type-issue-should-it-be-resolved-at-the-ingestion-process-or-before/159174/2 "2018-12-03T20:22:34Z")

</div>

For the moment I've resolved working on the CSV input, but I'll be happy if anyone has some suggestions to deal with not perfectly formated file like that, where average\_rank is supposed to be a float

```
"name","avg_rank"
"richard","1,65"
"john","8,34"
"dan","0,78"
"alicia","14,659"

```

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 31, 2018, 8:22pm UTC](https://discuss.elastic.co/t/float-type-issue-should-it-be-resolved-at-the-ingestion-process-or-before/159174/3 "2018-12-31T20:22:39Z")

</div>

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