apache/seatunnel · error · RuntimeException

Not support the placeholder

Error message

Not support the placeholder: %s

What it means

SaveModePlaceHolder.getDisplay could not match the incoming placeholder string against any enum constant's keyValue — the '${name}' token used in custom save-mode SQL is not one of the supported placeholders (such as database or table). The unrecognized placeholder string itself is the input at fault; the enum lookup simply found no match.

Solutions

  1. Check the placeholder spelling inside the custom SQL against the supported SaveModePlaceHolder keys (e.g. ${database}, ${table})
  2. Remove the unsupported placeholder and hardcode the value if no variable applies
  3. Add a new enum constant if a genuinely new placeholder is needed, and document it
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/SaveModePlaceHolder.java:57 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/SaveModePlaceHolder.java:57

    private static final String PLACE_HOLDER = "${%s}";

    SaveModePlaceHolder(String keyValue, String display) {
        this.keyValue = keyValue;
        this.display = display;
    }

    public static String getDisplay(String placeholder) {
        Optional<SaveModePlaceHolder> saveModePlaceHolderEnumOptional =
                Arrays.stream(SaveModePlaceHolder.values())
                        .filter(
                                saveModePlaceHolderEnum ->
                                        placeholder.equals(
                                                saveModePlaceHolderEnum.getPlaceHolder()))
                        .findFirst();
        if (saveModePlaceHolderEnumOptional.isPresent()) {
            return saveModePlaceHolderEnumOptional.get().display;
        }
        throw new RuntimeException(String.format("Not support the placeholder: %s", placeholder));
    }

    public String getPlaceHolderKey() {
        return this.keyValue;
    }

    public String getPlaceHolder() {
        return String.format(PLACE_HOLDER, getPlaceHolderKey());
    }

    public String getReplacePlaceHolder() {
        return String.format(REPLACE_PLACE_HOLDER, getPlaceHolderKey());
    }
}

View on GitHub (pinned to cf67b549a7)