# Data type can not change from float to long issue

**URL:** https://discuss.elastic.co/t/data-type-can-not-change-from-float-to-long-issue/138917
**Category:** Logstash
**Created:** [July 6, 2018, 12:59pm UTC](https://discuss.elastic.co/t/data-type-can-not-change-from-float-to-long-issue/138917 "2018-07-06T12:59:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ajit](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@ajit](https://discuss.elastic.co/u/ajit)
#### Post date: [July 6, 2018, 12:59pm UTC](https://discuss.elastic.co/t/data-type-can-not-change-from-float-to-long-issue/138917/1 "2018-07-06T12:59:55Z")

</div>

Hi,  
I am using ELK 6.3.0 version. I am pushing data to ES using logstash JDBC.  
I have one query which is fetching 188 records in Oracle.  
But from logstash my 8 records getting missed. I am getting data type convert exception i.e. can not convert from float to long. This happens only first time while pushing data to ES and for only 8 records. After pushing 180 records to ES then second time I am restarting logstash at that time all records gets pushed to ES i.e. 188.

please provide solution on this issue. I want all records to be pushed in ES at first time also without any exception.

Below is my logstash logs.  
[2018-07-06T12:37:24,629][WARN][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {tatus=\>400, :action=\>["index", {:\_id=\>nil, :\_index=\>"bank\_crisil\_rated", :\_type=\>"doc", :\_routing=\>nil}, #LogStash::Event:0x10d76091], :response=\>{"index"=\>{"\_index"=\>"bank\_crisil\_rated", "\_type"=\>"doc", "\_id"=\>"urdqbmQBoIEiWn9atfMr", "status"=\>400, "error"=\>{"type"=\>"illegal\_argument\_exception", "reason"=\>"mapper [total\_income] cannot be changed from type [float] to [long]"}}}}

Note: my database columns contains decimal values. But only few columns giving exception. Here my column name is "total\_income" in logs. In database table it contains decimal values.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [July 7, 2018, 7:34am UTC](https://discuss.elastic.co/t/data-type-can-not-change-from-float-to-long-issue/138917/2 "2018-07-07T07:34:38Z")

</div>

Can you please edit your post and remove the formatting, it's really difficult to read.

---

<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: [August 4, 2018, 7:34am UTC](https://discuss.elastic.co/t/data-type-can-not-change-from-float-to-long-issue/138917/3 "2018-08-04T07:34:41Z")

</div>

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