根据报错信息,可以看出问题出现在 'timestamp' long 这段代码上。long 不是一个合法的数据类型,应该使用 BIGINT 来表示长整型数据。

正确的 Flink SQL 语句应该为:

CREATE TABLE json_source (
  `timestamp` BIGINT
) WITH (
  'connector' = 'kafka',
  'topic' = 'unnest2',
  'properties.bootstrap.servers' = 'cdh111:9092',
  'properties.group.id' = 'testGroup',
  'format' = 'json',
  'scan.startup.mode' = 'latest-offset'
)
flink sql 语句为CREATE TABLE json_source timestamp long WITH connector = kafka topic = unnest2 propertiesbootstrapservers = cdh1119092propertiesgroupid = testGroup format = json scanstartupmode=latest-o

原文地址: https://www.cveoy.top/t/topic/i8vK 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录