Can some one help I am trying to run a simple tumb...
# troubleshooting
k
Can some one help I am trying to run a simple tumbling window example with flink SQL and while executing the query I am getting the bellow error. I have included flink-connector-kafka in flink lib directory.
Copy code
CREATE TABLE CPU_IN (hostname STRING,
cpu STRING,
usage DOUBLE,
occurred_at BIGINT,
time_ltz AS TO_TIMESTAMP_LTZ(occurred_at, 3),
WATERMARK FOR time_ltz AS time_ltz - INTERVAL '10' SECONDS
) WITH (
	'connector' = 'kafka',
    'properties.bootstrap.servers' = 'localhost:9092',
    'topic' = 'cpu_load',
    'value.format' = 'json',
    'properties.group.id' = 'testGroup',
	'scan.startup.mode' = 'latest-offset'
);
Copy code
CREATE TABLE CPU_OUT_AGG (
window_start TIMESTAMP(3), 
window_end TIMESTAMP(3), 
hostname STRING, 
cpu STRING, 
usage_avg DOUBLE 
) WITH ( 
	'connector' = 'kafka',
	'topic-pattern' = 'SINK_TABLE',
    'properties.bootstrap.servers' = 'localhost:9092',
    'topic' = 'cpu_out',
    'value.format' = 'json',
    'properties.group.id' = 'testGroup',
    'scan.startup.mode' = 'latest-offset'
);
b
you need the
flink-sql-connector-*
jars instead. Notice the
-sql-
in the name. This is a fat jar used for both DataStream and Table APIs
Make sure to remove the other jars though since you’ll get conflicts in versions
k
thanks its working 🙌