创建 bigquery table 架构时出现问题

Problems while creating bigquery table schema

使用 Google BigQuery 我需要手动创建一个 table 并加载 json 文件中包含的数据。我正在使用 BigQuery UI,但无法定义数据的架构,下面给出了相同的示例。 json 数组出现问题,如下所示。

{"Author": "Pranesh Nageshwar", "headline": "Train trashes crashed car", "charactercount": 1027, "dateLive": "2014-01-14", "keywords": ["train crash", "freight train", "online reporting page", "side road", "blue mountains", "new south wales", "australia", "blaxland", "new south wales", "australia", "crime stoppers", "springwood police station", "train tracks"], "id": "1226801299367"}

BigQuery 中的值数组表示为具有重复模式的字段。您想要的架构可能如下所示。如果您将其复制并粘贴到网络中的框中 UI,我认为它会起作用。

[
  {
    "name": "author",
    "type": "string"
  },
  {
    "name": "headline",
    "type": "string"
  },
  {
    "name": "charactercount",
    "type": "integer"
  },
  {
    "name": "dateLive",
    "type": "string",
  },
  {
    "name": "keywords",
    "type": "string",
    "mode": "repeated"
  },
  {
    "name": "id",
    "type": "string"
  }
]