Added a JAR file on Flink SQL but can't create a Clickhouse sink table properly
Opened this issue · 1 comments
nsia-henry commented
Hi,
I am trying to create a Clickhouse (CH) sink table using Flink SQL. I am new at using Flink SQL and I was trying to create a sink table to store data into CH. To do so,
-
I dowloaded a
flink-clickhouse-sink-1.3.1.jar
from https://jar-download.com/artifacts/ru.ivi.opensource/flink-clickhouse-sink/1.3.1 -
I created a target table in CH
CREATE TABLE default.flink_table (
CUSTOMERID String,
CAMPAIGNID String,
TOTALRECIPIENTS Int32,
DELIVERYRATE Int32,
STATUS String
)
Engine = MergeTree()
ORDER BY tuple;
- I created a sink table from flink like so;
CREATE TABLE flink_table_sink (
CUSTOMERID STRING,
CAMPAIGNID STRING,
TOTALRECIPIENTS INT,
DELIVERYRATE Int32,
STATUS String,
PRIMARY KEY (CAMPAIGNID) NOT ENFORCED
)
WITH (
'connector' = 'clickhouse',
'url' = 'clickhouse://ip:port',
'database-name' = 'default',
'table-name' = 'flink_table'
);
- I tried to insert values into the sink table (flink_table_sink), I got this error message;
To me it looks like Flink didn't recognize the clickhouse flink jar file, but I can't figure out why. Because it still shows it in the jar files.
Can anyone help?
lampjian commented
This is a "High-performance library for loading data to ClickHouse". There is no stable high level table api yet before flink version 1.13. So you may take a look at the readme page, and use it in a streaming API way by programming.