# Logic Error after ingesting number

**URL:** https://discuss.elastic.co/t/logic-error-after-ingesting-number/314331
**Category:** Logstash
**Created:** [September 13, 2022, 6:54pm UTC](https://discuss.elastic.co/t/logic-error-after-ingesting-number/314331 "2022-09-13T18:54:00Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![hnf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hnf/32/109840_2.png) [@hnf](https://discuss.elastic.co/u/hnf)
#### Post date: [September 13, 2022, 6:54pm UTC](https://discuss.elastic.co/t/logic-error-after-ingesting-number/314331/1 "2022-09-13T18:54:00Z")

</div>

I have an xlsx file that I convert in CSV file using ssconvert tool. In the new generated file, there's one field in floating point type. But after ingestion, the values taken from the file is no more in float.

For exemple: This value `99,8923` become `"99,8923"` in the generated file but other values in the same field are correctly parsed, like `54` is `54`.

I suspect that the probleme may come from `"` added around the number. After ingesting this number with **Logstash** , it becomes `998923` even if I specify in logstash that it is a `float` and I can see clearly that the field is typed with `float` in Kibana.

Here is the version I'm currently using:  
**Elasticsearch : 8.3**  
**Kibana : 8.3**  
**Operating Sys : Red Hat Enterprise Linux 8.5 (Ootpa)**

Thanks for your help.

---

<div class="post-metadata">

### Author: ![cheshirecat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheshirecat/32/109532_2.png) [@cheshirecat](https://discuss.elastic.co/u/cheshirecat)
#### Post date: [September 14, 2022, 10:46am UTC](https://discuss.elastic.co/t/logic-error-after-ingesting-number/314331/2 "2022-09-14T10:46:16Z")

</div>

Hello There!

> [@hnf](#):
>
> `"99,8923"`

How about changing "," to "." as a decimal separator in `ssconvert`?

---

<div class="post-metadata">

### Author: ![hnf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hnf/32/109840_2.png) [@hnf](https://discuss.elastic.co/u/hnf)
#### Post date: [September 14, 2022, 7:28pm UTC](https://discuss.elastic.co/t/logic-error-after-ingesting-number/314331/3 "2022-09-14T19:28:50Z")

</div>

Hello @cheshirecat ,

I didn't find a way for changing this with `ssconvert`. Do you know how to do it with it? or do you know a way to change `","` to `"."`?

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [September 14, 2022, 7:59pm UTC](https://discuss.elastic.co/t/logic-error-after-ingesting-number/314331/4 "2022-09-14T19:59:33Z")

</div>

Perhaps look at mutate convert [here](https://www.elastic.co/guide/en/logstash/current/plugins-filters-mutate.html#plugins-filters-mutate-convert)

Also make sure you create a mapping ahead of time for that type

> - `float`:
> 
> - `float_eu`:

---

<div class="post-metadata">

### Author: ![hnf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hnf/32/109840_2.png) [@hnf](https://discuss.elastic.co/u/hnf)
#### Post date: [September 14, 2022, 8:22pm UTC](https://discuss.elastic.co/t/logic-error-after-ingesting-number/314331/5 "2022-09-14T20:22:33Z")

</div>

Hello @stephenb ,

I already used `convert`, and there is others that I convert perfectly in `floating point` type with logstash.

The field with the issue is in type float, but values are not coherent...

I'm actually working on a way to treat this before sending to logstash...

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [September 14, 2022, 9:03pm UTC](https://discuss.elastic.co/t/logic-error-after-ingesting-number/314331/6 "2022-09-14T21:03:09Z")

</div>

OK if you showed us a full source line... pretty sure we could fix it in logstash... but at the source is even better.

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [September 14, 2022, 9:13pm UTC](https://discuss.elastic.co/t/logic-error-after-ingesting-number/314331/7 "2022-09-14T21:13:46Z")

</div>

I just ran this pipeline

```auto
input { stdin { ecs_compatibility => "v8"} }

filter {
   mutate {
        convert => {
          "message" => "float_eu"
        }
    }
}

output { stdout {} }

```

stdin

```auto
> 99,8923
{
    "@timestamp" => 2022-09-14T21:12:13.177705Z,
          "host" => {
        "hostname" => "hyperion"
    },
       "message" => 99.8923,
      "@version" => "1",
         "event" => {
        "original" => "99,8923"
    }
}
> 1.123,45     
{
    "@timestamp" => 2022-09-14T21:14:21.722249Z,
          "host" => {
        "hostname" => "hyperion"
    },
       "message" => 1123.45,
      "@version" => "1",
         "event" => {
        "original" => "1.123,45"
    }
}

```

Worked Fine Note it is a normal `float` on the output not `text/keword`

---

<div class="post-metadata">

### Author: ![hnf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hnf/32/109840_2.png) [@hnf](https://discuss.elastic.co/u/hnf)
#### Post date: [September 15, 2022, 8:32am UTC](https://discuss.elastic.co/t/logic-error-after-ingesting-number/314331/8 "2022-09-15T08:32:38Z")

</div>

Hello @stephenb ,

I really appreciate your help and it's working. Sometimes, I feel like "Why I didn't see that" 🙄... That's why the community is around 😀, so your help was a light...

Thanks so much...

---

<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: [October 13, 2022, 8:32am UTC](https://discuss.elastic.co/t/logic-error-after-ingesting-number/314331/9 "2022-10-13T08:32:53Z")

</div>

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