apache/flink · error · ValidationException

Unsupported value '%s' for %s. Supported values are [SQL, IS

Error message

Unsupported value '%s' for %s. Supported values are [SQL, ISO-8601].

What it means

ValidationException from validateTimestampFormat when 'timestamp-format' is not exactly 'SQL' or 'ISO-8601' (exact, case-sensitive membership in TIMESTAMP_FORMAT_ENUM). Thrown during both decoding and encoding option validation, i.e., at CREATE TABLE time.

Source

Thrown at flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/JsonFormatOptionsUtil.java:139

                Arrays.stream(JsonFormatOptions.MapNullKeyMode.values())
                        .map(Objects::toString)
                        .collect(Collectors.toSet());
        if (!nullKeyModes.contains(tableOptions.get(MAP_NULL_KEY_MODE).toUpperCase())) {
            throw new ValidationException(
                    String.format(
                            "Unsupported value '%s' for option %s. Supported values are %s.",
                            tableOptions.get(MAP_NULL_KEY_MODE),
                            MAP_NULL_KEY_MODE.key(),
                            nullKeyModes));
        }
        validateTimestampFormat(tableOptions);
    }

    /** Validates timestamp format which value should be SQL or ISO-8601. */
    static void validateTimestampFormat(ReadableConfig tableOptions) {
        String timestampFormat = tableOptions.get(TIMESTAMP_FORMAT);
        if (!TIMESTAMP_FORMAT_ENUM.contains(timestampFormat)) {
            throw new ValidationException(
                    String.format(
                            "Unsupported value '%s' for %s. Supported values are [SQL, ISO-8601].",
                            timestampFormat, TIMESTAMP_FORMAT.key()));
        }
    }

    private JsonFormatOptionsUtil() {}
}

View on GitHub (pinned to 2f3c205e92)

Solutions

  1. Set 'json.timestamp-format' to exactly 'SQL' or 'ISO-8601'
  2. Pick ISO-8601 for 'yyyy-MM-ddTHH:mm:ss.SSSZ' style, SQL for 'yyyy-MM-dd HH:mm:ss.S{precision}'
  3. Re-run the DDL after the fix

Example fix

-- before
'timestamp-format' = 'iso-8601'

-- after
'timestamp-format' = 'ISO-8601'
Defensive patterns

Strategy: validation

Validate before calling

JsonFormatOptionsUtil.validateTimestampFormat(tableOptions); // exact-match SQL / ISO-8601

Prevention

When it happens

Trigger: 'timestamp-format' = 'sql' (lowercase), 'iso8601', or any variant spelling in a JSON-format DDL.

Common situations: Copy from docs that normalized case; locale-specific config tooling rewriting values; mixing up with other formats' option names.

Related errors


AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14). Data as JSON: /api/errors/1e899b58a3fb6abf. Report an issue: GitHub.