[Feature][Connector-V2] Support multi-table sink feature for ClickHouse#9301
Merged
Conversation
…CA` optional into the `optionRule` method optional of `ClickhouseSinkFactory`
…to ClickhouseSinkWriter in ClickhouseSink
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for the multi-table sink feature for ClickHouse by enhancing the connector implementation, updating configurations, tests, and documentation.
- Introduces a new test resource and accompanying end-to-end test case for multi-table sink.
- Enhances the ClickHouse connector by implementing the multi-table sink interfaces.
- Updates both Chinese and English documentation with examples and usage details for the new feature.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| seatunnel-e2e/seatunnel-connector-v2-e2e/connector-clickhouse-e2e/src/test/resources/fake_to_clickhouse_with_multi_table.conf | New configuration file for multi-table sink testing |
| seatunnel-e2e/seatunnel-connector-v2-e2e/connector-clickhouse-e2e/src/test/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/ClickhouseIT.java | Added an end-to-end test case for multi-table sink support |
| seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/client/ClickhouseSinkWriter.java | Updated to implement the SupportMultiTableSinkWriter interface |
| seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/client/ClickhouseSinkFactory.java | Extended the OptionRule to include the new multi-table sink option |
| seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/client/ClickhouseSink.java | Updated to implement the SupportMultiTableSink interface and adjust writer creation accordingly |
| docs/{zh,en}/connector-v2/sink/Clickhouse.md | Updated documentation with new examples and configuration details for multi-table sink |
Comments suppressed due to low confidence (1)
seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/client/ClickhouseSinkFactory.java:80
- [nitpick] Verify if the addition of MULTI_TABLE_SINK_REPLICA in the option rule is sufficiently documented or if further options are required to fully support multi-table routing in various deployment scenarios.
SAVE_MODE_CREATE_TEMPLATE, SinkConnectorCommonOptions.MULTI_TABLE_SINK_REPLICA)
Hisoka-X
reviewed
May 12, 2025
Hisoka-X
reviewed
May 12, 2025
Hisoka-X
reviewed
May 13, 2025
hailin0
approved these changes
May 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of this pull request
[Feature][ClickHouse] Support multi-table sink feature #5652
Does this PR introduce any user-facing change?
No, just a new feature of multi-table sink for clickhouse.
How was this patch tested?
Add a new e2e test case.
Check list
New License Guide
release-note.