Skip to content

Commit

Permalink
Make debezium.sink.iceberg.table-prefix optional (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsimsek committed Jun 13, 2023
1 parent f28ce7e commit 9286294
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public class IcebergChangeConsumer extends BaseChangeConsumer implements Debeziu
@ConfigProperty(name = "debezium.sink.iceberg.destination-regexp-replace", defaultValue = "")
protected Optional<String> destinationRegexpReplace;
@ConfigProperty(name = "debezium.sink.iceberg.table-prefix", defaultValue = "")
String tablePrefix;
Optional<String> tablePrefix;
@ConfigProperty(name = "debezium.sink.iceberg.table-namespace", defaultValue = "default")
String namespace;
@ConfigProperty(name = "debezium.sink.iceberg.catalog-name", defaultValue = "default")
Expand Down Expand Up @@ -213,6 +213,6 @@ public TableIdentifier mapDestination(String destination) {
.replaceAll(destinationRegexp.orElse(""), destinationRegexpReplace.orElse(""))
.replace(".", "_");

return TableIdentifier.of(Namespace.of(namespace), tablePrefix + tableName);
return TableIdentifier.of(Namespace.of(namespace), tablePrefix.orElse("") + tableName);
}
}

0 comments on commit 9286294

Please sign in to comment.