itinycheng / flink-connector-clickhouse

Flink SQL connector for ClickHouse. Support ClickHouseCatalog and read/write primary data, maps, arrays to clickhouse.
Apache License 2.0
346 stars 148 forks source link

Support URLs with query params #129

Open sap1ens opened 3 weeks ago

sap1ens commented 3 weeks ago

Currently, this connector doesn't support URLs with query params, e.g. ?ssl=true.

Simply removing the trailing slash from the base URL should solve it.

I opened https://github.com/itinycheng/flink-connector-clickhouse/pull/108, but it was closed.

czy006 commented 2 weeks ago

@sap1ens We are now encountering challenges. After replacing the client, we need to re-verify many behaviors. We plan to build new infrastructure unit facilities for testing, so I cannot currently judge whether this function can run accurately after being merged. Maybe that's why it's closed. I can turn on this pull request again

czy006 commented 2 weeks ago

image

czy006 commented 2 weeks ago

CREATE TABLE t_user ( -- id DECIMAL, col1 STRING, col2 STRING, col3 STRING ) WITH ( 'connector' = 'clickhouse', 'url' = 'jdbc:ch://xxx.xxx.xxx:8123?useSSL=false', 'database-name' = 'persona', 'table-name' = 'persona_wide_table', 'sink.batch-size' = '500', 'sink.flush-interval' = '1000', 'sink.max-retries' = '3' );

-- read data from clickhouse SELECT * from t_user limit 10; @sap1ens I test it can select it