Elbehery commented on code in PR #15615:
URL: https://github.com/apache/iceberg/pull/15615#discussion_r3316488555
##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/data/IcebergWriterFactory.java:
##########
@@ -93,7 +96,39 @@ Table autoCreateTable(String tableName, SinkRecord sample) {
structType = SchemaUtils.toIcebergType(sample.valueSchema(),
config).asStructType();
}
- org.apache.iceberg.Schema schema = new
org.apache.iceberg.Schema(structType.fields());
+ // Get ID columns configuration and map to field IDs
+ List<String> idColumns = config.tableConfig(tableName).idColumns();
+
+ // Create initial schema to get field IDs
+ org.apache.iceberg.Schema initialSchema = new
org.apache.iceberg.Schema(structType.fields());
+
+ // Validate and map ID columns to field IDs
+ Set<Integer> identifierFieldIds = Sets.newHashSet();
Review Comment:
makes perfect sense, I agree this approach is way better 👍🏽
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]