我面临着 pubsub 架构演变的问题,当我添加新字段时,它们的值最终在 BigQuery 中为空。我的项目结构如下。
{
"namespace": "com.value.model",
"name": "ValuePoint",
"type" : "record",
"fields" : [
{
"name" : "application_id",
"type" : "string"
},
{
"name" : "user_id",
"type" : "string"
}
]
}
客户端开始向主题发送 avro 消息,并且流向 BQ 的情况良好。
{
"namespace": "com.value.model",
"name": "ValuePoint",
"type" : "record",
"fields" : [
{
"name" : "application_id",
"type" : "string"
},
{
"name" : "user_id",
"type" : "string"
},
{
"name" : "new_field",
"type" : [null, "string"],
"default" : "null"
}
]
}
"Revision is incompatible with previous revision: 4179a86e. Failed with error: Presence of non-optional field new_field is inconsistent.
我也面临着同样的问题。我在主题架构 (AVRO) 中添加了一个新的可选字段,并在 GBQ 表中添加了相应的列。现在,主题消息已发布,并在新字段上带有值。然而,即使等待了几个小时,表中的新列也没有被 GBQ 订阅填充。