Kafka Connect: Add table to topics mapping property #10422
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.
The property which allows mapping Kafka topics to Iceberg tables:
An example config would look like:
iceberg.tables.topic-to-table-mapping=some_topic0:table_name0,some_topic1:table_name1
Similar approach implemented in SnowflakeSink, ClickhouseSink, Aiven JdbcSink. Probably I can call it a standard way of static routing data in sink connectors at the moment.
The reason I stated thinking of implementing this because it isn't obvious from the config (or readme) how one should map the topics to tables in the original version because there is no clear indication of where the
.route-regex
is applied.This could be done for
.partition-by
and.id-columns
configs as well, but using tables as map keys is such case.I am making the same PR as the one in the tabular-io/iceberg-kafka-connect#223 because I was told that it is being moved to this core repository.
It seems that the code hasn't been fully migrated to this core repository yet and I am aware of there should be further tasks such as adding the rest of functionality from the above PR into IcebergSinkTask (as I see it), but would like to share the idea and get initial feedback. Thanks!