Cloud BigQueryにテーブルがありますが、サービスがあります.Tabledata.InsertAllコールでは、ネストされたフィールドにデータが挿入されます。Google BigQueryのテーブルのネストされたフィールドにデータを挿入
// works
jsonRow["name"] = bigquery.JsonValue("Name")
// doesn't work
jsonRow["geo_location.City.Names.en"] = bigquery.JsonValue("Irvine")
rows[index] = new(bigquery.TableDataInsertAllRequestRows)
rows[index].Json = jsonRow
insertRequest := &bigquery.TableDataInsertAllRequest{Rows: rows}
insertRequest.IgnoreUnknownValues = true
call := service.Tabledata.InsertAll(project, dataset, "analytics_events", insertRequest)
if res, err := call.Do(); err!=nil{
Log.Fatal("Unable to Insert to BigQuery ", err)
return err
}
ジェレミー、コードサンプルまたは要点はありますか?それは非常に役に立つでしょう –