# Empty value cant be converted to integer or float

**URL:** https://discuss.elastic.co/t/empty-value-cant-be-converted-to-integer-or-float/55646
**Category:** Logstash
**Created:** [July 15, 2016, 6:15pm UTC](https://discuss.elastic.co/t/empty-value-cant-be-converted-to-integer-or-float/55646 "2016-07-15T18:15:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ngumba\_Kamau](https://avatars.discourse-cdn.com/v4/letter/n/90db22/32.png) [@Ngumba\_Kamau](https://discuss.elastic.co/u/Ngumba_Kamau)
#### Post date: [July 15, 2016, 6:15pm UTC](https://discuss.elastic.co/t/empty-value-cant-be-converted-to-integer-or-float/55646/1 "2016-07-15T18:15:45Z")

</div>

When specifying the schema for the logstash-output-google\_bigquery plugin whenever i select integer or float as the type for the field i get a cannot convert value to integer. This problem has been pinned down to having empty fields. is there a way to allow empty fields to be uploaded?  
`BQ: job failed, please enable debug and check full response (probably the issue is an incompatible schema). NOT deleting local file. {:job_id=>"job_Yz72z1YtMQ56SdH4-4S1SQYiFlM", :filename=>"/tmp/logstash-bq1/logstash_bq_etl-log-guc-01_2016-07-15T18:00.part051.log", :job_status=>{"state"=>"DONE", "errorResult"=>{"reason"=>"invalid", "location"=>"file-00000000", "message"=>"JSON table encountered too many errors, giving up. Rows: 1; errors: 1."}, "errors"=>[{"reason"=>"invalid", "location"=>"file-00000000", "message"=>"JSON table encountered too many errors, giving up. Rows: 1; errors: 1."}, {"reason"=>"invalid", "message"=>"JSON parsing error in row starting at position 0 at file: file-00000000. Could not convert value to integer. Field: headAdvertiserId; Value: "}]}, :level=>:error}`

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [July 22, 2016, 3:33pm UTC](https://discuss.elastic.co/t/empty-value-cant-be-converted-to-integer-or-float/55646/2 "2016-07-22T15:33:46Z")

</div>

This seems more like a BigQuery question.

---

<div class="post-metadata">

### Author: ![Ngumba\_Kamau](https://avatars.discourse-cdn.com/v4/letter/n/90db22/32.png) [@Ngumba\_Kamau](https://discuss.elastic.co/u/Ngumba_Kamau)
#### Post date: [July 22, 2016, 7:22pm UTC](https://discuss.elastic.co/t/empty-value-cant-be-converted-to-integer-or-float/55646/3 "2016-07-22T19:22:29Z")

</div>

yes sorry i found it was an error on the big query side due to my logstash fields being set to empty strings so as to avoid having the field names printed. but thank you for the help

---

<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: [July 6, 2017, 4:46am UTC](https://discuss.elastic.co/t/empty-value-cant-be-converted-to-integer-or-float/55646/4 "2017-07-06T04:46:45Z")

</div>


