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

I cannot use OPTION 'properties.*'. #118

Open YahorBurakevich opened 4 months ago

YahorBurakevich commented 4 months ago

https://github.com/itinycheng/flink-connector-clickhouse/blob/a71a0ed2d55f63f903cf7d3bbe0c3ecaf0a9ba92/flink-connector-clickhouse/src/main/java/org/apache/flink/connector/clickhouse/internal/AbstractClickHouseOutputFormat.java#L192 I cannot use OPTION 'properties.*', it does not work, it always empty in ClickHouseConnectionProvider class. If I changed code like this, it works for me - connectionProvider = new ClickHouseConnectionProvider(options); to connectionProvider = new ClickHouseConnectionProvider(options, connectionProperties);

itinycheng commented 4 months ago

Hi @YahorBurakevich

Can you describe the scenario where you have to pass 'properties.*' to this temporary ClickHouse connection?

YahorBurakevich commented 4 months ago

Hi, @itinycheng I need to use ssl mode for connect to Clickhouse. I passed properties.ssl = true

itinycheng commented 4 months ago

Hi, @itinycheng I need to use ssl mode for connect to Clickhouse. I passed properties.ssl = true

@YahorBurakevich

Ok, got it. Use new ClickHouseConnectionProvider(options, connectionProperties); seems more reasonable here. I'll find time to fix it.

czy006 commented 2 weeks ago

@itinycheng I test properties.ssl = false,it seems not work on flink sql