After configuring debezium to capture events from my table T1 whenever I change a row I get a warning like the following
WARN Column 'myCol1' available in capture table not found among source table columns (io.debezium.connector.sqlserver.SqlServerChangeTablePointer)
Which causes that the data from those fields are not included inside the Kafka topic.
Said columns are using User-Defined data types like CString:varchar(30)
I've tried using a custom converter with the following method
public class CustomSqlTypeConverter implements CustomConverter<SchemaBuilder, RelationalColumn> {
private static final Logger LOGGER = LoggerFactory.getLogger(CustomSqlTypeConverter.class);
@Override
public void configure(Properties props) {
}
@Override
public void converterFor(RelationalColumn column, ConverterRegistration<SchemaBuilder> registration) {
String columnType = column.typeName().toUpperCase();
switch (columnType) {
case "NSTRING":
case "CSTRING":
case "QSTRINGDT":
case "TCODE":
case "TINFO":
case "TINFO_U":
registration.register(SchemaBuilder.string().optional(), rs -> rs.toString());
LOGGER.info("Mapped SQL type CONTRACTNAME to String.");
break;
default:
LOGGER.debug("No custom mapping for type: {}", columnType);
}
}
}
Also I have tried to explicitly listed the columns in the connector configuration
"column.include.list": "dbo.table1.(pkCol|myCol1|myCol2)
I'm using SQL Server 2017 and Debezium 3.0.2 Final