# Issue in import csv functionality with timestamp field contains spaces and kommas

**URL:** <https://discuss.elastic.co/t/issue-in-import-csv-functionality-with-timestamp-field-contains-spaces-and-kommas/260584>\
**Category:** Kibana\
**Created:** [January 8, 2021, 10:20pm UTC](https://discuss.elastic.co/t/issue-in-import-csv-functionality-with-timestamp-field-contains-spaces-and-kommas/260584 "2021-01-08T22:20:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![willemdh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/willemdh/32/16922_2.png) [@willemdh](https://discuss.elastic.co/u/willemdh)\
**Post date:** [January 8, 2021, 10:20pm UTC](https://discuss.elastic.co/t/issue-in-import-csv-functionality-with-timestamp-field-contains-spaces-and-kommas/260584/1 "2021-01-08T22:20:02Z")

</div>

Hello,

Kibana 7.10.1. Tried to use the import csv functionality and for some reason is the first colomn header replaced by a value with a front and end space..

![image](https://us1.discourse-cdn.com/elastic/original/3X/5/e/5e1260baed488ef1ccf4708699974029a9c04ca0.png)

![image](https://us1.discourse-cdn.com/elastic/original/3X/7/9/79bf2e3aa18da05b78676ad76d6dc304c916d02f.png)

Seem like a bug? The csv was exported from Excel.

Also I seem to still have the exact same issue as I had in April 2019 =https://discuss.elastic.co/t/unable-to-import-csv-with-floats-in-7-x-rc2/175918

![image](https://us1.discourse-cdn.com/elastic/original/3X/5/f/5f74adda58d3e95922f0ab1ef83c72283ad98872.png)

Values with a ',' (which is a komma in europe) keeps being assigned a keyword mapping. Even when overriding to a long, uploading seems to fail, the index ends up emtpy and I get:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/4/6402a7bdfa5d166949251482c8b0e4089b03c065.png)

Willem

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [January 11, 2021, 10:49am UTC](https://discuss.elastic.co/t/issue-in-import-csv-functionality-with-timestamp-field-contains-spaces-and-kommas/260584/2 "2021-01-11T10:49:39Z")

</div>

Hi Willem,

You can convert the European format into the correct format using a painless script in the ingest pipeline like:

```auto
{
  "script": {
    "lang": "painless",
    "source": "ctx.totalGB = NumberFormat.getInstance(Locale.ITALY).parse(ctx.totalGB);",
  }
}

```

see [https://www.elastic.co/guide/en/elasticsearch/reference/master/script-processor.html](https://www.elastic.co/guide/en/elasticsearch/reference/master/script-processor.html)

Use the correct Locale constant depending on the exported locale from excel.

If I remember correctly, excel also allows you to export numbers without formatting them in the current locale when exporting a CSV

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [January 11, 2021, 10:53am UTC](https://discuss.elastic.co/t/issue-in-import-csv-functionality-with-timestamp-field-contains-spaces-and-kommas/260584/3 "2021-01-11T10:53:22Z")

</div>

For the spaces issue, please double check if the csv first column header has some hidden characters (could happen if the text was copied from an html file or something)  
In anycase you can always rename your field changing the pipeline with:

```auto
{
  "rename": {
    "field": "provider",
    "target_field": "cloud.provider"
  }
}

```

see [https://www.elastic.co/guide/en/elasticsearch/reference/master/rename-processor.html](https://www.elastic.co/guide/en/elasticsearch/reference/master/rename-processor.html)

---

<div class="post-metadata">

**Author:** ![willemdh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/willemdh/32/16922_2.png) [@willemdh](https://discuss.elastic.co/u/willemdh)\
**Post date:** [January 11, 2021, 3:33pm UTC](https://discuss.elastic.co/t/issue-in-import-csv-functionality-with-timestamp-field-contains-spaces-and-kommas/260584/4 "2021-01-11T15:33:41Z")

</div>

@markov00 Thank you very much for your answers.

Although changing the locale in Excell would be a solution, this is not an option for me, as using a komma `,` to split the decimals is standard practice in Europe.

Using the painless script could also be an option, but imho this (basic) import csv functionality is getting somehow complex. In the meantime I switched to PowerBI and was able to show the graphs I needed in less then 2 minutes. Could an enhancement request be an idea, so European decimal format is recognized out of the box?

(also, I triple checked the column headers and there were definitely no special chars in it)

Thanks

Willem

---

<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:** [February 8, 2021, 3:33pm UTC](https://discuss.elastic.co/t/issue-in-import-csv-functionality-with-timestamp-field-contains-spaces-and-kommas/260584/5 "2021-02-08T15:33:43Z")

</div>

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