简体   繁体   中英

Null nested fields in Google BigQuery

I'm trying to upload a json file to BigQuery contaning a nested field which is null but it's not accepting.

I tried a lot of different syntax but I always got the error: File: 0 / Offset:0 / Line:1 / Column:410, missing required field(s)

I tried to sent the value as many different values listed below and even ommiting it... "quotas": [] "quotas": null "quotas": "null" etc...

The schema definition... [..] "name": "quotas", "type": "record", "mode": "repeated", "fields":[
{ "name": "service", "type": "string", "mode": "nullable" }, [..] ] [..]
[..] "name": "quotas", "type": "record", "mode": "repeated", "fields":[
{ "name": "service", "type": "string", "mode": "nullable" }, [..] ] [..]

From what I can tell in the logs for the import worker for that job, the line in question is missing a required field (the field name starts with "msi"). The line is otherwise well-formatted from what I can tell. I've filed a bug that BigQuery should give the name of the required field or fields that are missing to make this easier to debug in the future.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM