# Error with integer field in kibana

**URL:** <https://discuss.elastic.co/t/error-with-integer-field-in-kibana/232042>\
**Category:** Elasticsearch\
**Created:** [May 11, 2020, 2:15pm UTC](https://discuss.elastic.co/t/error-with-integer-field-in-kibana/232042 "2020-05-11T14:15:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hiba](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hiba/32/110919_2.png) [@hiba](https://discuss.elastic.co/u/hiba)\
**Post date:** [May 11, 2020, 2:15pm UTC](https://discuss.elastic.co/t/error-with-integer-field-in-kibana/232042/1 "2020-05-11T14:15:55Z")

</div>

Hi,

my data source is as follows (API json)

{  
"bookings": [  
{  
"bookingId": 553267,  
"bookingRef": "VO20200108460",  
"statusId": 1,  
"status": "Confirmed",  
"createdDate": "2020-01-06 00:00:00",  
"confirmedDate": "",  
"hotelId": 17060,  
"hotelName": "Nerolia Hotel & SPA 4\*",  
"hotelCity": "Monastir",  
"hotelCountry": "Tunisie",  
"hotelAddress": "Zone Touristique Dkhila Skanes,Monastir",  
"hotelPhone": 73275420,  
"arrDate": "2020-01-03",  
"depDate": "2020-01-05",  
"price": 0,  
"currency": "",  
"purchasePrice": 0,  
"cancelDeadline": "",  
"partnerId": 10361,  
}]}

my problem :  
when I consulted my data in discover I have for example( "bookingId":553,267)or( "hotelId" : 17060)

 ![l](https://us1.discourse-cdn.com/elastic/original/3X/c/a/ca50aa964cfc3958136d5322c0e2ce33dd577131.png)  
what can i do tho have the correct datatype ("bookingId":553267)!!!!!

my config file:  
input {  
http\_poller {  
urls =\> {  
url =\> "xxx"  
}  
request\_timeout =\> 60  
schedule =\> { every =\> "60s" }  
codec =\> "json"  
}  
}  
filter {  
split { field =\> "[bookings]" }  
split { field =\> "[bookings][rooms]" }  
mutate {  
rename =\> {  
"[bookings][bookingId]" =\> "bookingId"  
"[bookings][confirmedDate]" =\> "confirmedDate"  
"[bookings][status]" =\> "status"  
"[bookings][hotelId]" =\> "hotelId"  
"[bookings][hotelName]" =\> "hotelName"  
"[bookings][hotelCity]" =\> "hotelCity"  
"[bookings][hotelCountry]" =\> "hotelCountry"  
"[bookings][arrDate]" =\> "arrDate"  
"[bookings][depDate]" =\> "depDate"  
"[bookings][price]" =\> "price"  
"[bookings][currency]" =\> "currency"  
"[bookings][purchasePrice]" =\> "purchasePrice"  
"[bookings][partnerName]" =\> "partnerName"  
"[bookings][partnerId]" =\> "partnerId"  
"[bookings][firstName]" =\> "firstName"  
"[bookings][lastName]" =\> "lastName"  
"[bookings][channel]" =\> "channel"  
"[bookings][supplierName]" =\> "supplierName"  
"[bookings][rooms][board]" =\> "board"  
"[bookings][rooms][paxes][adults]" =\> "adults"  
"[bookings][rooms][paxes][infant]" =\> "infant"  
"[bookings][rooms][paxes][children]" =\> "children"  
"[bookings][rooms][quantity]" =\> "quantity"  
"[bookings][rooms][room]" =\> "room"   
}  
convert =\> {  
"bookingId" =\> "integer"  
"hotelId" =\> "integer"  
"partnerId" =\> "integer"  
"adults" =\> "integer"  
"infant" =\> "integer"  
"children" =\> "integer"  
"quantity" =\> "integer"  
}  
remove\_field =\> ["bookingRef", "bookings", "createdDate", "hotelAddress", "hotelPhonearrDate", "customerId", "title", "email", "city", "mobile", "supplierId","paxe", "payments", "options", "isXML"]  
}  
}  
output {  
elasticsearch {  
hosts =\> "localhost:9200"  
index =\> "bookings"  
action =\> "update"  
doc\_as\_upsert =\> "true"  
document\_id =\> "%{bookingId}"  
}  
stdout { codec =\> rubydebug }  
}

---

<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 8, 2020, 2:16pm UTC](https://discuss.elastic.co/t/error-with-integer-field-in-kibana/232042/2 "2020-06-08T14:16:04Z")

</div>

Closed on June 8, 2020, 2:16pm UTC

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