目前,fluxksql的状态很难理解在哪个版本中支持/拒绝/强制/可选哪个特性。confluent的文档没有明确的版本引用并不能让它变得更好,所以我被困在这里:
create table gtest (ID varchar PRIMARY KEY) with (kafka_topic = 'g', value_format='avro');
创建语法错误
line 1:32: mismatched input 'PRIMARY' expecting {',', ')'}
Statement: create table gtest (ID varchar PRIMARY KEY) with (kafka_topic = 'g', value_format='avro');
Caused by: line 1:32: mismatched input 'PRIMARY' expecting {',', ')'}
Caused by: org.antlr.v4.runtime.InputMismatchException
主题可用,用schema创建,它可以从oracle数据库导入数据,流可以创建,一切都很好。但是这个表不会与我找到的所有文档相反。我错过了什么?
我使用的是Confluent5.5.1,构建形式为tarball,ksql0.11.0是从confluentinc的docker映像构建的。
架构:
{
"subject": "g-key",
"version": 1,
"id": 1,
"schema": "{\"type\":\"record\",\"name\":\"ConnectDefault\",\"namespace\":\"io.confluent.connect.avro\",\"fields\":[{\"name\":\"ID\",\"type\":\"string\"}]}"
}
{
"subject": "g-value",
"version": 1,
"id": 6,
"schema": "{\"type\":\"record\",\"name\":\"ConnectDefault\",\"namespace\":\"io.confluent.connect.avro\",\"fields\":[{\"name\":\"GT_ID\",\"type\":{\"type\":\"int\",\"connect.type\":\"int8\"}},{\"name\":\"BARCODE\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"LP_ID\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"IN_G_ID\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"RS\",\"type\":\"string\"},{\"name\":\"NSP\",\"type\":\"string\"},{\"name\":\"EINT\",\"type\":\"string\"},{\"name\":\"EINDATE\",\"type\":{\"type\":\"long\",\"connect.version\":1,\"connect.name\":\"org.apache.kafka.connect.data.Timestamp\",\"logicalType\":\"timestamp-millis\"}},{\"name\":\"MKZ\",\"type\":\"string\"},{\"name\":\"AKM\",\"type\":\"int\"},{\"name\":\"AKT\",\"type\":\"int\"},{\"name\":\"LZTB\",\"type\":{\"type\":\"long\",\"connect.version\":1,\"connect.name\":\"org.apache.kafka.connect.data.Timestamp\",\"logicalType\":\"timestamp-millis\"}},{\"name\":\"TE\",\"type\":\"string\"},{\"name\":\"QU\",\"type\":\"string\"},{\"name\":\"ZWIZ\",\"type\":\"string\"},{\"name\":\"ENDL\",\"type\":\"string\"},{\"name\":\"FREIP\",\"type\":\"string\"},{\"name\":\"HRLZ\",\"type\":\"string\"},{\"name\":\"PERFZ\",\"type\":\"string\"},{\"name\":\"EINLO\",\"type\":[\"null\",{\"type\":\"long\",\"connect.version\":1,\"connect.name\":\"org.apache.kafka.connect.data.Timestamp\",\"logicalType\":\"timestamp-millis\"}],\"default\":null},{\"name\":\"UMKJN\",\"type\":\"string\"},{\"name\":\"KOLR\",\"type\":[\"null\",\"int\"],\"default\":null},{\"name\":\"LA_ID\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"VIEW_B\",\"type\":[\"null\",\"string\"],\"default\":null}]}"
}
任何提示欢迎!
1条答案
按热度按时间os8fio9y1#
cp的当前版本是5.5.1,文档中说它有kqsldb v0.7.1,但是从ksqldbv0.10开始就可以使用“主键”语法