# Csv output problem with numbers?

**URL:** <https://discuss.elastic.co/t/csv-output-problem-with-numbers/85458>\
**Category:** Logstash\
**Created:** [May 11, 2017, 5:44pm UTC](https://discuss.elastic.co/t/csv-output-problem-with-numbers/85458 "2017-05-11T17:44:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![henrilabarre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/henrilabarre/32/16909_2.png) [@henrilabarre](https://discuss.elastic.co/u/henrilabarre)\
**Post date:** [May 11, 2017, 5:44pm UTC](https://discuss.elastic.co/t/csv-output-problem-with-numbers/85458/1 "2017-05-11T17:44:09Z")

</div>

Hi with ES 5.4 and LG 5.4

I try this

```auto
output {
  csv {
	fields => ["nom","nom_maire","CODGEO", "street", "cp","nomcommune","departement","DEPET","region","email","siteweb","tel","fax","population","location[lat]","location[lon]"]
	path => "/home/jsondata/57cae745456ab85d4ff76a83ef3f1f0e/dp_577b539512dfa520df2c0a18ffb8482f.csv"
  }
}

```

The raw data from ES

```auto
{
        "_index" : "sirene",
        "_type" : "logs",
        "_id" : "mairie-49317-01",
        "_score" : 1.8746464,
        "_source" : {
          "DEPET" : "49",
          "siteweb" : "http://www.saint-remy-la-varenne.fr",
          "identifiant" : "mairie-49317-01",
          "dept" : "49",
          "nom" : "Mairie de Saint-Rémy-la-Varenne",
          "cp" : "49250",
          "CODGEO" : "49317",
          "nomcommune" : "Saint-Rémy-la-Varenne",
          "provider" : "sp_mairie",
          "street" : "4 rue de la Mairie",
          "@version" : "1",
          "host" : "host4-vm101",
          "miseajour" : "all_20170508",
          "tel" : "0241570394",
          "location" : {
            "lon" : -0.317674010992,
            "lat" : 47.3968009949
          },
          "num_region" : "52",
          "population" : 975.0
        }

```

As you see "population" and "lat" and "lon" are number

the output give me this:

`Mairie de Saint-Rémy-la-Varenne,01247,Rue Dame-Pernette,01410,Mijoux,Ain,01,Auvergne Rhône-Alpes,accueil.mairie@mijoux.fr,http://www.mijoux.fr,0450413204,0450413288,0.975E3,0.463662528992E2,0.599627113342E1`  
the output of the numbers seem to be in scientific format how can I output decimal number??

---

<div class="post-metadata">

**Author:** ![henrilabarre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/henrilabarre/32/16909_2.png) [@henrilabarre](https://discuss.elastic.co/u/henrilabarre)\
**Post date:** [May 12, 2017, 12:41pm UTC](https://discuss.elastic.co/t/csv-output-problem-with-numbers/85458/2 "2017-05-12T12:41:43Z")

</div>

Sorry my question wasn't very clear....

I output a cvs file with the csv plugin and the field with float value output in a scientific format with E. How can I transform this in decimal value (best for latitude and longitude)

Thanks

---

<div class="post-metadata">

**Author:** ![henrilabarre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/henrilabarre/32/16909_2.png) [@henrilabarre](https://discuss.elastic.co/u/henrilabarre)\
**Post date:** [May 15, 2017, 7:58am UTC](https://discuss.elastic.co/t/csv-output-problem-with-numbers/85458/3 "2017-05-15T07:58:18Z")

</div>

The solution is here

> <https://github.com/logstash-plugins/logstash-output-csv/issues/16>

I need to reconvert the number after get them but the plugin input elasticsearch

---

<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:** [June 12, 2017, 8:11am UTC](https://discuss.elastic.co/t/csv-output-problem-with-numbers/85458/4 "2017-06-12T08:11:58Z")

</div>

Closed on June 12, 2017, 8:11am UTC

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