将数据流式传输到Google BigQuery的架构是什么?

时间:2014-01-31 00:39:23

标签: google-bigquery

我正在尝试将JSON数据流式传输到BigQuery中。它的Example from Google Developers,他们要求代码中的Schema文件

  url = "https://www.googleapis.com/upload/bigquery/v2/projects/" + projectId + "/jobs"
  newSchemaFile = raw_input("What is your schema? ")
  schema = open(newSchemaFile, 'r')

此架构文件的格式是什么。我似乎无法找到任何相关信息?

1 个答案:

答案 0 :(得分:0)

4列表的示例模式:

          [
            {
              'name': 'Name',
              'type': 'STRING'
            },
            {
              'name': 'Age',
              'type': 'INTEGER'
            },
            {
              'name': 'Weight',
              'type': 'FLOAT'
            },
            {
              'name': 'IsMagic',
              'type': 'BOOLEAN'
            }
          ]