apache/seatunnel · error · SeaTunnelException
Unsupported schemaChangeEvent :
Error message
Unsupported schemaChangeEvent :
What it means
applySingleSchemaChangeEvent only supports AddColumnEvent; when ES reconverts the new column it calls esRestClient.addField to update the index mapping. Any other AlterTableColumnEvent subtype throws SeaTunnelException('Unsupported schemaChangeEvent : ' + event.getEventType()).
Source
Thrown at seatunnel-connectors-v2/connector-elasticsearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/sink/ElasticsearchSinkWriter.java:219
initializeSerializer(tableSchema.toPhysicalRowDataType());
}
static boolean isCommentOnlyEvent(SchemaChangeEvent event) {
return event instanceof AlterTableCommentEvent || event instanceof AlterColumnCommentEvent;
}
private void applySingleSchemaChangeEvent(SchemaChangeEvent event) {
if (isCommentOnlyEvent(event)) {
log.debug("Ignore comment-only schema change event: {}", event);
} else if (event instanceof AlterTableAddColumnEvent) {
AlterTableAddColumnEvent addColumnEvent = (AlterTableAddColumnEvent) event;
Column column = addColumnEvent.getColumn();
BasicTypeDefine<EsType> reconvert =
ElasticSearchTypeConverter.INSTANCE.reconvert(column);
esRestClient.addField(indexInfo.getIndex(), reconvert);
log.info("Add column {} to index {}", column.getName(), indexInfo.getIndex());
} else {
throw new SeaTunnelException("Unsupported schemaChangeEvent : " + event.getEventType());
}
}
@Override
public Optional<ElasticsearchCommitInfo> prepareCommit() {
bulkEsWithRetry(this.esRestClient, this.requestEsList);
return Optional.empty();
}
/**
* Flushes pending bulk requests when the Zeta engine delivers a timer flush signal.
*
* <p>The action is registered before multi-table resource injection but invoked after startup.
*/
private void timerFlush() {
bulkEsWithRetry(this.esRestClient, this.requestEsList);
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Only perform ADD COLUMN DDL on synced tables, or apply drop/rename/modify manually to the ES index mapping
- Filter unsupported column events upstream via a transform or routing
- Upgrade the connector if newer versions support more event types
Defensive patterns
Strategy: type-guard
Validate before calling
if (event instanceof AlterTableColumnEvent && !(event instanceof AddColumnEvent)) {
log.warn("Only ADD COLUMN is supported by ES sink; event type: " + ((AlterTableColumnEvent) event).getEventType());
return;
} Type guard
boolean isAddColumnEvent(AlterTableEvent e) {
return e instanceof AddColumnEvent;
} Prevention
- Restrict pipeline DDL to ADD COLUMN
- Manually maintain index mappings for drop/rename/modify operations
- Audit upstream schema-change producers feeding the sink
When it happens
Trigger: A CDC schema-change event of type other than ADD_COLUMN (e.g. DROP_COLUMN, RENAME_COLUMN, MODIFY_COLUMN, CHANGE_COLUMN_TYPE) reaches the ES sink during applySchemaChange.
Common situations: Upstream databases altering column types, renaming or dropping columns while a CDC sync into Elasticsearch is running.
Related errors
- Unsupported alter table event:
- Unsupported alter table event:
- Unsupported alter table event:
- Unsupported schemaChangeEvent: {event.getClass().getName()}
- Unsupported AlterTableColumnEvent type: {event.getClass().ge
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/8b863238a82a3962.
Report an issue: GitHub.