Google bigquery BigQuery API';复制作业失败:没有此类字段';恢复json备份时

Google bigquery BigQuery API';复制作业失败:没有此类字段';恢复json备份时,google-bigquery,Google Bigquery,我正在使用BigQueryAPI将表备份到云存储,这很好。但是,当我尝试创建一个还原作业以将备份文件加载到BigQuery中时,我收到一个错误,指出复制作业失败,因为架构中指定的所有字段都没有“此类字段”。模式作为JSON文件保存在repo中,其他api操作使用它,我们所有的表都会出现这个问题,所以我认为模式更改不是问题所在。作业配置和示例错误如下,如有任何想法,将不胜感激 {'configuration': { 'load': { 'destinationTable':

我正在使用BigQueryAPI将表备份到云存储,这很好。但是,当我尝试创建一个还原作业以将备份文件加载到BigQuery中时,我收到一个错误,指出复制作业失败,因为架构中指定的所有字段都没有“此类字段”。模式作为JSON文件保存在repo中,其他api操作使用它,我们所有的表都会出现这个问题,所以我认为模式更改不是问题所在。作业配置和示例错误如下,如有任何想法,将不胜感激

{'configuration': {
    'load': {
        'destinationTable': {
            'projectId': 'someproject',
            'tableId': 'backuptesttable',
            'datasetId': 'warehouse_dev'
        },
        'sourceFormat': 'NEWLINE_DELIMITED_JSON',
        'sourceUris': ['gs:///followers/backupfile.json.gz'],
        'schema': 'schema data loaded from file'
    }
}
更新

我把我正在测试的表换成了“followers”,因为它有点简单。这是模式:

[{'mode': 'required', 'name': 'time', 'type': 'timestamp'},
 {'mode': 'required', 'name': 'followers', 'type': 'integer'},
 {'mode': 'required', 'name': 'account', 'type': 'string'},
 {'mode': 'required', 'name': 'platform', 'type': 'string'},
 {'mode': 'required', 'name': 'source', 'type': 'string'}]
这是全部错误:

Copy job failed: {'state': 'DONE', 'errors': [{'reason': 'invalid', 'location': 'File: 0 / Offset:0 / Line:1 / Column:12 / Field:followers', 'message': 'no such field'}, {'reason': 'invalid', 'location': 'File: 0 / Offset:110 / Line:2 / Column:12 / Field:followers', 'message': 'no such field'}, {'reason': 'invalid', 'location': 'File: 0 / Offset:220 / Line:3 / Column:12 / Field:followers', 'message': 'no such field'}, {'reason': 'invalid', 'location': 'File: 0 / Offset:330 / Line:4 / Column:12 / Field:followers', 'message': 'no such field'}, {'reason': 'invalid', 'location': 'File: 0 / Offset:440 / Line:5 / Column:12 / Field:followers', 'message': 'no such field'}], 'errorResult': {'reason': 'invalid', 'location': 'File: 0 / Offset:440 / Line:5 / Column:12 / Field:followers', 'message': 'no such field'}}
这是备份文件中的一个示例行:

{"followers":"12345","account":"some account","platform":"plus","source":"API","time":"2015-04-14 14:58:13 UTC"}

“followers”始终是行中的第一个字段,但鉴于架构,bigquery似乎无法将其识别为有效字段……我尝试重新排列架构文件中字段的顺序,但没有任何效果。

能否将架构包括在示例中?从错误消息中,看起来文件:0/Offset:44215/Line:5/Column:14包含一个不在架构定义中的字段“facebook_id”。此外,如果您可以提供由于此错误而失败的作业的project\u id:job\u id,我们可能可以找到其他信息。我添加了架构、完整错误和示例行。您可以在示例中包括架构吗?从错误消息中,看起来文件:0/Offset:44215/Line:5/Column:14包含一个不在架构定义中的字段“facebook_id”。此外,如果您可以提供由于此错误而失败的作业的project\u id:job\u id,我们可能可以找到其他信息。我添加了架构、完整错误和示例行。