1
votes

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
You need to transform your data to include numbers like strings. - Pentium10
Is it better to make me transform how in this case? - ka2u
Well check different fluentd plugins that can help you, maybe github.com/lob/fluent-plugin-json-transform - Pentium10
Thank you. I'll check it. - ka2u
It seems fluent-plugin-typecast suits in my case. - ka2u

1 Answers