Error in bq load “Could not convert value to string”

旧时模样 提交于 2021-01-29 02:04:15

问题


I tried to load logs from Google Cloud Storage to BigQuery by the bq command and I've got this error "Could not convert value to string".

my example data

{"ids":"1234,5678"}
{"ids":1234}

my example schema

[
    { "name":"ids", "type":"string" }
]

It seems IDs can't convert by none quote at single ID. Data is made with fluent-plugin-s3, but more than one ID connected by a comma can be bound up with a quotation and isn't made single id.

How can I load these data to BigQuery?

Thanks in advance


回答1:


Well check different fluentd plugins that can help you, maybe

  • https://github.com/lob/fluent-plugin-json-transform
  • https://github.com/tarom/fluent-plugin-typecast


来源:https://stackoverflow.com/questions/32822428/error-in-bq-load-could-not-convert-value-to-string

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!