kumarpritam863 commented on code in PR #15209:
URL: https://github.com/apache/iceberg/pull/15209#discussion_r2807554818
##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/data/RecordConverter.java:
##########
@@ -81,11 +86,21 @@ class RecordConverter {
private final NameMapping nameMapping;
private final IcebergSinkConfig config;
private final Map<Integer, Map<String, NestedField>> structNameMap =
Maps.newHashMap();
+ private final int tableFormatVersion;
RecordConverter(Table table, IcebergSinkConfig config) {
this.tableSchema = table.schema();
this.nameMapping = createNameMapping(table);
this.config = config;
+
+ int formatVersion;
+ try {
+ formatVersion = TableUtil.formatVersion(table);
+ } catch (Exception ex) {
+ LOG.error("Failed to retrieve format version from table {}",
table.name(), ex);
+ formatVersion = -1;
+ }
+ this.tableFormatVersion = formatVersion;
Review Comment:
@danielcweeks I do n ot want to fail the job if format fetch fails as
default is secondary and successful data ingestion is primary responsibility of
the connector.
--
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]