{"record":{"id":"aaec7888f820a90e","repo":"apache/seatunnel","slug":"schema-save-mode-recreate-schema-is-not-supported","errorCode":null,"errorMessage":"schema_save_mode RECREATE_SCHEMA is not supported by the DeepLake sink","messagePattern":"schema_save_mode RECREATE_SCHEMA is not supported by the DeepLake sink","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-deeplake/src/main/java/org/apache/seatunnel/connectors/seatunnel/deeplake/config/DeepLakeSinkConfig.java","lineNumber":60,"sourceCode":"        this.workspace = config.get(DeepLakeSinkOptions.WORKSPACE);\n        this.table =\n                config.getOptional(DeepLakeSinkOptions.TABLE)\n                        .orElse(catalogTable.getTableId().getTableName());\n        this.batchSize = config.get(DeepLakeSinkOptions.BATCH_SIZE);\n        this.connectTimeoutMs = config.get(DeepLakeSinkOptions.CONNECT_TIMEOUT_MS);\n        this.socketTimeoutMs = config.get(DeepLakeSinkOptions.SOCKET_TIMEOUT_MS);\n        this.schemaSaveMode = config.get(DeepLakeSinkOptions.SCHEMA_SAVE_MODE);\n\n        requireNonBlank(apiUrl, \"api_url\");\n        requireNonBlank(apiKey, \"api_key\");\n        requireNonBlank(orgId, \"org_id\");\n        requireNonBlank(workspace, \"workspace\");\n        requireNonBlank(table, \"table\");\n        requirePositive(batchSize, \"batch_size\");\n        requirePositive(connectTimeoutMs, \"connect_timeout_ms\");\n        requirePositive(socketTimeoutMs, \"socket_timeout_ms\");\n        if (schemaSaveMode == SchemaSaveMode.RECREATE_SCHEMA) {\n            throw new IllegalArgumentException(\n                    \"schema_save_mode RECREATE_SCHEMA is not supported by the DeepLake sink\");\n        }\n    }\n\n    private static String removeTrailingSlash(String value) {\n        if (value == null) {\n            return null;\n        }\n        int end = value.length();\n        while (end > 0 && value.charAt(end - 1) == '/') {\n            end--;\n        }\n        return value.substring(0, end);\n    }\n\n    private static void requireNonBlank(String value, String option) {\n        if (value == null || value.trim().isEmpty()) {\n            throw new IllegalArgumentException(option + \" must not be blank\");","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-deeplake/src/main/java/org/apache/seatunnel/connectors/seatunnel/deeplake/config/DeepLakeSinkConfig.java#L42-L78","documentation":"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.","triggerScenarios":"Configuring the Deep Lake sink with schema_save_mode = RECREATE_SCHEMA — validation runs in the DeepLakeSinkConfig constructor during option parsing.","commonSituations":"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.","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"],"exampleFix":"// before\nschema_save_mode = RECREATE_SCHEMA\n// after\nschema_save_mode = CREATE_SCHEMA_WHEN_NOT_EXIST","handlingStrategy":"validation","validationCode":"String mode = config.getString(\"schema_save_mode\");\nif (\"RECREATE_SCHEMA\".equalsIgnoreCase(mode)) throw new IllegalStateException(\"DeepLake sink: use CREATE_SCHEMA_WHEN_NOT_EXIST or ERROR_WHEN_SCHEMA_NOT_EXIST\");","typeGuard":null,"tryCatchPattern":"try { new DeepLakeSinkConfig(options); } catch (IllegalArgumentException e) { if (e.getMessage().contains(\"RECREATE_SCHEMA\")) { /* correct config and rebuild */ } throw e; }","preventionTips":["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"],"tags":["deeplake","config","schema-save-mode"],"backgroundTag":"unsupported-config-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}