我已经开始探索 apache Pinot,关于 Apache Pinot架构的查询很少。我想了解 apache pinot 如何与具有 AVRO 架构的 Kafka 主题一起工作(架构包括嵌套对象、对象数组等),因为我没有找到任何资源或示例来展示我们如何使用具有 avro 的 Kafka 注入数据架构与它。
根据我对 apache pinot 的理解,我们必须为嵌套的 Json 对象提供平面模式或其他选项,我们可以使用转换函数。是否有任何类型的 Kafka 连接用于 Pinot 进行数据注入?
Avro 架构
{
"namespace" : "my.avro.ns",
"name": "MyRecord",
"type" : "record",
"fields" : [
{"name": "uid", "type": "int"},
{"name": "somefield", "type": "string"},
{"name": "options", "type": {
"type": "array",
"items": {
"type": "record",
"name": "lvl2_record",
"fields": [
{"name": "item1_lvl2", "type": "string"},
{"name": "item2_lvl2", "type": {
"type": "array",
"items": {
"type": "record",
"name": "lvl3_record",
"fields": [
{"name": "item1_lvl3", "type": "string"},
{"name": "item2_lvl3", "type": "string"}
]
}
}}
]
}
}}
]
}
卡夫卡 Avro 消息:
{
"uid": 29153333,
"somefield": "somevalue",
"options": [
{
"item1_lvl2": "a",
"item2_lvl2": [
{
"item1_lvl3": "x1",
"item2_lvl3": "y1"
},
{
"item1_lvl3": "x2",
"item2_lvl3": "y2"
}
]
}
]
}