{"record":{"id":"663807b4b7095774","repo":"apache/seatunnel","slug":"the-configuration-of-overwrite-is-deprecated-pl","errorCode":null,"errorMessage":"The configuration of 'overwrite' is deprecated, please use 'data_save_mode' instead.","messagePattern":"The configuration of 'overwrite' is deprecated, please use 'data_save_mode' instead\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-maxcompute/src/main/java/org/apache/seatunnel/connectors/seatunnel/maxcompute/sink/MaxcomputeSink.java","lineNumber":88,"sourceCode":"                        MaxcomputeSinkOptions.PLUGIN_NAME);\n        if (catalogFactory == null) {\n            throw new MaxcomputeConnectorException(\n                    SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,\n                    String.format(\n                            \"PluginName: %s, PluginType: %s, Message: %s\",\n                            getPluginName(),\n                            PluginType.SINK,\n                            \"Cannot find MaxCompute catalog factory\"));\n        }\n        MaxComputeCatalog catalog =\n                (MaxComputeCatalog)\n                        catalogFactory.createCatalog(\n                                catalogFactory.factoryIdentifier(), readonlyConfig);\n\n        DataSaveMode dataSaveMode = readonlyConfig.get(MaxcomputeSinkOptions.DATA_SAVE_MODE);\n        if (readonlyConfig.get(MaxcomputeSinkOptions.OVERWRITE)) {\n            // compatible with old version\n            LOG.warn(\n                    \"The configuration of 'overwrite' is deprecated, please use 'data_save_mode' instead.\");\n            dataSaveMode = DataSaveMode.DROP_DATA;\n        }\n\n        return Optional.of(\n                new MaxComputeSaveModeHandler(\n                        readonlyConfig.get(MaxcomputeSinkOptions.SCHEMA_SAVE_MODE),\n                        dataSaveMode,\n                        catalog,\n                        catalogTable,\n                        readonlyConfig.get(MaxcomputeSinkOptions.CUSTOM_SQL),\n                        readonlyConfig));\n    }\n\n    @Override\n    public Optional<CatalogTable> getWriteCatalogTable() {\n        return super.getWriteCatalogTable();\n    }","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-maxcompute/src/main/java/org/apache/seatunnel/connectors/seatunnel/maxcompute/sink/MaxcomputeSink.java#L70-L106","documentation":"The MaxCompute sink's old boolean 'overwrite' option has been superseded by the richer 'data_save_mode' enum. getSaveModeHandler detects the legacy option and logs this deprecation warning while mapping overwrite=true to DataSaveMode.DROP_DATA for backward compatibility.","triggerScenarios":"A sink config contains \"overwrite\": true while DataSaveMode is read from MaxcomputeSinkOptions.DATA_SAVE_MODE in getSaveModeHandler.","commonSituations":"Jobs migrated from older SeaTunnel versions still carry overwrite=true in the HOCON config; users copy old example configs from blogs or previous releases.","solutions":["Remove the 'overwrite' option and set \"data_save_mode\" = \"DROP_DATA\" (or the desired mode) instead.","If overwrite=false, simply delete the option and keep the default data_save_mode.","Review docs for available DataSaveMode values (e.g. APPEND_DATA, DROP_DATA, CUSTOM_PROCESSING)."],"exampleFix":"// before\nsink {\n  Maxcompute {\n    overwrite = true\n  }\n}\n// after\nsink {\n  Maxcompute {\n    data_save_mode = \"DROP_DATA\"\n  }\n}","handlingStrategy":"validation","validationCode":"// reject legacy option in config validation\nif (config.hasPath(\"overwrite\")) {\n    throw new IllegalArgumentException(\"'overwrite' is deprecated; use 'data_save_mode' instead\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Grep job configs for 'overwrite' after upgrading SeaTunnel","Prefer data_save_mode enums in all new job templates","Pin config examples to current documentation versions"],"tags":["maxcompute","deprecated","config","sink"],"backgroundTag":"deprecated-api-usage","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}