我可以从 presto 的 kafka 主题中获取数据,如下属性:
/etc/kafka/mytable.json
{
"tableName": "mytable",
"schemaName": "mykafka",
"topicName": "mykafka.mytable",
"message": {
"dataFormat": "json",
"fields": [
{
"name": "id",
"mapping": "id",
"type": "INTEGER"
},
{
"name": "name",
"mapping": "name",
"type": "VARCHAR"
}
]
}
它在获取数据时起作用。select * from kafka.mykafka."mytable"
但是当我想插入数据时,它给出了这个错误:
insert into kafka.mykafka."mytable"(id,name) values(111,'presto db test');
Query 20211007_053816_00016_x6wzd, FAILED, 1 node
Splits: 2 total, 1 done (50.00%)
0:00 [0 rows, 0B] [0 rows/s, 0B/s]
Query 20211007_053816_00016_x6wzd failed: unknown data format 'dummy'
我该如何处理?
提前致谢