apache/seatunnel · error · IcebergConnectorException
UNSUPPORTED_OPERATION
UNSUPPORTED_OPERATION
Error message
Unsupported stream scan strategy:
What it means
IcebergScanSplitPlanner.getStreamStartSnapshot() resolves the starting snapshot for streaming reads from the configured StreamScanStrategy enum; any strategy value it doesn't recognize hits the default branch and throws IcebergConnectorException(UNSUPPORTED_OPERATION). This guards against unknown or future strategy values.
Source
Thrown at seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/source/enumerator/scan/IcebergScanSplitPlanner.java:164
case FROM_LATEST_SNAPSHOT:
return Optional.ofNullable(table.currentSnapshot());
case FROM_EARLIEST_SNAPSHOT:
return Optional.ofNullable(SnapshotUtil.oldestAncestor(table));
case FROM_SNAPSHOT_ID:
return Optional.of(table.snapshot(icebergScanContext.getStartSnapshotId()));
case FROM_SNAPSHOT_TIMESTAMP:
long snapshotIdAsOfTime =
SnapshotUtil.snapshotIdAsOfTime(
table, icebergScanContext.getStartSnapshotTimestamp());
Snapshot matchedSnapshot = table.snapshot(snapshotIdAsOfTime);
if (matchedSnapshot.timestampMillis()
== icebergScanContext.getStartSnapshotTimestamp()) {
return Optional.of(matchedSnapshot);
} else {
return Optional.of(SnapshotUtil.snapshotAfter(table, snapshotIdAsOfTime));
}
default:
throw new IcebergConnectorException(
CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION,
"Unsupported stream scan strategy: "
+ icebergScanContext.getStreamScanStrategy());
}
}
public static List<IcebergFileScanTaskSplit> planSplits(
Table table, IcebergScanContext context) {
try (CloseableIterable<CombinedScanTask> tasksIterable = planTasks(table, context)) {
List<IcebergFileScanTaskSplit> splits = new ArrayList<>();
for (CombinedScanTask combinedScanTask : tasksIterable) {
for (FileScanTask fileScanTask : combinedScanTask.files()) {
splits.add(new IcebergFileScanTaskSplit(context.getTablePath(), fileScanTask));
}
}
return splits;
} catch (IOException e) {
throw new IcebergConnectorException(View on GitHub (pinned to cf67b549a7)
Solutions
- Check the configured stream scan strategy value; valid options are the connector's enum constants (e.g. from-latest-snapshot, from-earliest-snapshot, from-snapshot-id, from-snapshot-timestamp, from-snapshot-reference, incremental)
- Fix the typos in job config and restart the job
- Align the connector plugin version with the version that wrote the config (install-plugin with matching version)
- If this occurs with a valid value, report a bug — the switch in getStreamStartSnapshot is missing a case
Example fix
// before stream-scan-strategy = "form-latest-snapshot" // after stream-scan-strategy = "from-latest-snapshot"
Defensive patterns
Strategy: validation
Validate before calling
// Validate the strategy against the connector's enum before submitting the job
Set<String> valid = Set.of("from-latest-snapshot","from-earliest-snapshot","from-snapshot-id","from-snapshot-timestamp","from-snapshot-reference","incremental");
if (!valid.contains(cfg.get("stream-scan-strategy"))) throw new IllegalArgumentException("invalid stream-scan-strategy"); Try / catch
try { planStream(); } catch (IcebergConnectorException e) { if (e.getSeaTunnelErrorCode() == UNSUPPORTED_OPERATION && e.getMessage().contains("Unsupported stream scan strategy")) { /* fix config and resubmit */ } throw e; } Prevention
- Copy strategy values only from official connector docs
- Pin connector plugin version matching your config examples
- Validate job config with the CLI before deployment
When it happens
Trigger: Streaming mode with a stream.scan-strategy config value not covered by the switch (typo, or a strategy added in a newer Iceberg connector version while running an older/patched build).
Common situations: Typos in stream-scan-strategy config; mixing connector/plugin jar versions so enum deserialization yields an unhandled constant.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- '%s' source don't support off-line job.
- CONFIGURATION_FAILED
- Table name is empty
- Unsupported transform:
- Invalid argument , should have 2 parts
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/df82f837c6e85b13.
Report an issue: GitHub.