apache/seatunnel · warning

The configuration of 'overwrite' is deprecated, please use '

Error message

The configuration of 'overwrite' is deprecated, please use 'data_save_mode' instead.

What it means

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.

Source

Thrown at seatunnel-connectors-v2/connector-maxcompute/src/main/java/org/apache/seatunnel/connectors/seatunnel/maxcompute/sink/MaxcomputeSink.java:88

                        MaxcomputeSinkOptions.PLUGIN_NAME);
        if (catalogFactory == null) {
            throw new MaxcomputeConnectorException(
                    SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
                    String.format(
                            "PluginName: %s, PluginType: %s, Message: %s",
                            getPluginName(),
                            PluginType.SINK,
                            "Cannot find MaxCompute catalog factory"));
        }
        MaxComputeCatalog catalog =
                (MaxComputeCatalog)
                        catalogFactory.createCatalog(
                                catalogFactory.factoryIdentifier(), readonlyConfig);

        DataSaveMode dataSaveMode = readonlyConfig.get(MaxcomputeSinkOptions.DATA_SAVE_MODE);
        if (readonlyConfig.get(MaxcomputeSinkOptions.OVERWRITE)) {
            // compatible with old version
            LOG.warn(
                    "The configuration of 'overwrite' is deprecated, please use 'data_save_mode' instead.");
            dataSaveMode = DataSaveMode.DROP_DATA;
        }

        return Optional.of(
                new MaxComputeSaveModeHandler(
                        readonlyConfig.get(MaxcomputeSinkOptions.SCHEMA_SAVE_MODE),
                        dataSaveMode,
                        catalog,
                        catalogTable,
                        readonlyConfig.get(MaxcomputeSinkOptions.CUSTOM_SQL),
                        readonlyConfig));
    }

    @Override
    public Optional<CatalogTable> getWriteCatalogTable() {
        return super.getWriteCatalogTable();
    }

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Remove the 'overwrite' option and set "data_save_mode" = "DROP_DATA" (or the desired mode) instead.
  2. If overwrite=false, simply delete the option and keep the default data_save_mode.
  3. Review docs for available DataSaveMode values (e.g. APPEND_DATA, DROP_DATA, CUSTOM_PROCESSING).

Example fix

// before
sink {
  Maxcompute {
    overwrite = true
  }
}
// after
sink {
  Maxcompute {
    data_save_mode = "DROP_DATA"
  }
}
Defensive patterns

Strategy: validation

Validate before calling

// reject legacy option in config validation
if (config.hasPath("overwrite")) {
    throw new IllegalArgumentException("'overwrite' is deprecated; use 'data_save_mode' instead");
}

Prevention

When it happens

Trigger: A sink config contains "overwrite": true while DataSaveMode is read from MaxcomputeSinkOptions.DATA_SAVE_MODE in getSaveModeHandler.

Common situations: Jobs migrated from older SeaTunnel versions still carry overwrite=true in the HOCON config; users copy old example configs from blogs or previous releases.

Understand the failure class

Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/663807b4b7095774. Report an issue: GitHub.