# Data Type issue from Data Visualizer Import Data in Kibana

**URL:** <https://discuss.elastic.co/t/data-type-issue-from-data-visualizer-import-data-in-kibana/232147>\
**Category:** Kibana\
**Created:** [May 12, 2020, 7:03am UTC](https://discuss.elastic.co/t/data-type-issue-from-data-visualizer-import-data-in-kibana/232147 "2020-05-12T07:03:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarvendras](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sarvendras/32/46287_2.png) [@sarvendras](https://discuss.elastic.co/u/sarvendras)\
**Post date:** [May 12, 2020, 7:03am UTC](https://discuss.elastic.co/t/data-type-issue-from-data-visualizer-import-data-in-kibana/232147/1 "2020-05-12T07:03:06Z")

</div>

Hi Team,

I am trying to import csv file in elasticsearch using Data Visualizer import file for creating index in ES.But I am facing some issues data type issues like some numerical field(values with decimals) in csv coming as string in elasticsearch.  
There is no option coming to change datatype during file import.How to keep numerical field as numerical in Elasticsearch.  
Please suggest.  
Thanks  
Sarvendra

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [May 12, 2020, 2:13pm UTC](https://discuss.elastic.co/t/data-type-issue-from-data-visualizer-import-data-in-kibana/232147/2 "2020-05-12T14:13:42Z")

</div>

you will need to add a custom mapping to set that field explicitly to a numerical data type.

this tutorial shows how: [https://www.elastic.co/blog/importing-csv-and-log-data-into-elasticsearch-with-file-data-visualizer](https://www.elastic.co/blog/importing-csv-and-log-data-into-elasticsearch-with-file-data-visualizer)

---

<div class="post-metadata">

**Author:** ![sarvendras](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sarvendras/32/46287_2.png) [@sarvendras](https://discuss.elastic.co/u/sarvendras)\
**Post date:** [May 13, 2020, 8:33am UTC](https://discuss.elastic.co/t/data-type-issue-from-data-visualizer-import-data-in-kibana/232147/3 "2020-05-13T08:33:32Z")

</div>

Thanks for the reply @thomasneirynck ..I can change datatype explicitly but records where that field have blank values are not imported in elasticsearch index .  
I tried giving long and float both but records with blank values of this fields are not imported in index with given below error.

19: failed to parse field [three\_month\_average\_swipe] of type [float] in document with id 'e5MiDXIB9jlPSD7wYxcX'. Preview of field's value: ' '

70: failed to parse field [three\_month\_average\_swipe] of type [float] in document with id 'rpMiDXIB9jlPSD7wYxcX'. Preview of field's value: ' '

Please suggest.

Sample value of that Field  
28717.22  
396554.5  
496955.88  
140875.57  
30023.71

Thanks  
Sarvendra

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [May 13, 2020, 1:52pm UTC](https://discuss.elastic.co/t/data-type-issue-from-data-visualizer-import-data-in-kibana/232147/4 "2020-05-13T13:52:14Z")

</div>

I see. I missed calling out you need to set the ingest-pipeline as well.

You can do the conversion explicitly using the "Convert" processor

[https://www.elastic.co/guide/en/elasticsearch/reference/current/convert-processor.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/convert-processor.html)

Something like:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/0/90012073ab3d1a252258715083046d454f75fad4.png)

---

<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 10, 2020, 1:52pm UTC](https://discuss.elastic.co/t/data-type-issue-from-data-visualizer-import-data-in-kibana/232147/5 "2020-06-10T13:52:20Z")

</div>

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