apache/seatunnel · error · IllegalArgumentException
schema_save_mode RECREATE_SCHEMA is not supported by the Dee
Error message
schema_save_mode RECREATE_SCHEMA is not supported by the DeepLake sink
What it means
DeepLakeSinkConfig's constructor rejects schema_save_mode=RECREATE_SCHEMA with an IllegalArgumentException because the Deep Lake sink does not implement dropping/recreating tables. Only supported modes are allowed.
Source
Thrown at seatunnel-connectors-v2/connector-deeplake/src/main/java/org/apache/seatunnel/connectors/seatunnel/deeplake/config/DeepLakeSinkConfig.java:60
this.workspace = config.get(DeepLakeSinkOptions.WORKSPACE);
this.table =
config.getOptional(DeepLakeSinkOptions.TABLE)
.orElse(catalogTable.getTableId().getTableName());
this.batchSize = config.get(DeepLakeSinkOptions.BATCH_SIZE);
this.connectTimeoutMs = config.get(DeepLakeSinkOptions.CONNECT_TIMEOUT_MS);
this.socketTimeoutMs = config.get(DeepLakeSinkOptions.SOCKET_TIMEOUT_MS);
this.schemaSaveMode = config.get(DeepLakeSinkOptions.SCHEMA_SAVE_MODE);
requireNonBlank(apiUrl, "api_url");
requireNonBlank(apiKey, "api_key");
requireNonBlank(orgId, "org_id");
requireNonBlank(workspace, "workspace");
requireNonBlank(table, "table");
requirePositive(batchSize, "batch_size");
requirePositive(connectTimeoutMs, "connect_timeout_ms");
requirePositive(socketTimeoutMs, "socket_timeout_ms");
if (schemaSaveMode == SchemaSaveMode.RECREATE_SCHEMA) {
throw new IllegalArgumentException(
"schema_save_mode RECREATE_SCHEMA is not supported by the DeepLake sink");
}
}
private static String removeTrailingSlash(String value) {
if (value == null) {
return null;
}
int end = value.length();
while (end > 0 && value.charAt(end - 1) == '/') {
end--;
}
return value.substring(0, end);
}
private static void requireNonBlank(String value, String option) {
if (value == null || value.trim().isEmpty()) {
throw new IllegalArgumentException(option + " must not be blank");View on GitHub (pinned to cf67b549a7)
Solutions
- Set schema_save_mode to a supported value such as create_schema_when_not_exist or error_when_schema_not_exist
- Pre-drop the table manually or via external orchestration before the job
- Use error_when_schema_not_exist together with external table lifecycle management
Example fix
// before schema_save_mode = RECREATE_SCHEMA // after schema_save_mode = CREATE_SCHEMA_WHEN_NOT_EXIST
Defensive patterns
Strategy: validation
Validate before calling
String mode = config.getString("schema_save_mode");
if ("RECREATE_SCHEMA".equalsIgnoreCase(mode)) throw new IllegalStateException("DeepLake sink: use CREATE_SCHEMA_WHEN_NOT_EXIST or ERROR_WHEN_SCHEMA_NOT_EXIST"); Try / catch
try { new DeepLakeSinkConfig(options); } catch (IllegalArgumentException e) { if (e.getMessage().contains("RECREATE_SCHEMA")) { /* correct config and rebuild */ } throw e; } Prevention
- Only use schema_save_mode values documented for the Deep Lake sink
- Never copy schema_save_mode from JDBC sink configs
- Handle table cleanup outside the pipeline if recreate semantics are needed
When it happens
Trigger: Configuring the Deep Lake sink with schema_save_mode = RECREATE_SCHEMA — validation runs in the DeepLakeSinkConfig constructor during option parsing.
Common situations: Copy-pasting sink configs from JDBC or other connectors where RECREATE_SCHEMA is valid; users wanting clean-load pipelines who assumed drop-and-recreate support.
Related errors
- ${option} must not be blank
- ${option} must be greater than zero
- TABLE_CREATE_FAILED
- CREATE_HIVE_TABLE_FAILED
- Schema config can not be empty
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/aaec7888f820a90e.
Report an issue: GitHub.