任何相关的帮助将不胜感激。在线生成的架构定义在使用负载表API时,BigQuery不接受架构生成器
我有几个不同的JSON文档需要插入到BigQuery中。现在为了避免手动生成模式,我使用了可用的在线Json模式生成工具的帮助。但由它们生成的模式未被BigQuery Load Data向导接受。 对于eaxmple:一个JSON数据是这样的:
{"_id":100,"actor":"KK","message":"CCD is good in Pune",
"comment":[{"actor":"Subho","message":"CCD is not as good in Kolkata."},
{"actor":"bisu","message":"CCD is costly too in Kolkata"}]
}
生成的模式通过在线工具是:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Generated from c:jsonccd.json with shasum a003286a350a6889b152
b3e33afc5458f3771e9c",
"type": "object",
"required": [
"_id",
"actor",
"message",
"comment"
],
"properties": {
"_id": {
"type": "integer"
},
"actor": {
"type": "string"
},
"message": {
"type": "string"
},
"comment": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "object",
"required": [
"actor",
"message"
],
"properties": {
"actor": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
但是,当我把它汇入BigQuery在加载数据向导时,出现错误。
如何减轻这种情况?
谢谢。
这并不是看所有的BigQuery模式,它是其他模式,你感到困惑。你使用了什么发电机? – Pentium10 2014-09-03 11:18:10
@Pentium 10 - 你可能没有仔细阅读我的问题。我在这里打印的模式是从联机Json模式生成器生成的。这是有效的。但是BigQuery不接受这种格式。现在是在这里的任何工具或实用程序,根据BigQuery可接受的格式生成模式? – Subhayu 2014-09-03 12:30:25
什么是错误? – Mario 2014-09-03 13:27:04