Please check my understanding of REPEATED field in the following examples:
{
\"title\": \"History of Alphabet\",
\"author\": [
{
Close. In your first example, author is an array of objects, which corresponds to a repeated record in BQ. So the schema would be:
[
{
"name": "title",
"type": "STRING"
},
{
"name": "author",
"type": "RECORD",
"mode": "REPEATED", <--- NOTE!
"fields": [
{
"name": "name",
"type": "STRING"
}
]
}
]
Your second data/schema pair looks good (but note that the overall schema is an array, not an object, and it needs commas between elements).
There is some discussion of nested and repeated fields here: https://cloud.google.com/bigquery/docs/data?hl=en#nested
There are also some sample JSON data objects here: https://cloud.google.com/bigquery/preparing-data-for-bigquery#dataformats
But I agree we don't do a good job of explaining how those objects map to BQ schemas. Sorry about that!