apache/seatunnel · error · SeaTunnelJsonFormatException

UNSUPPORTED_DATA_TYPE

UNSUPPORTED_DATA_TYPE

Error message

Unsupported format: 

What it means

AmazonSqsSinkWriter.createSerializationSchema builds the serialization schema from the configured format enum. If the format is not one of the supported cases (JSON, CANAL_JSON, DEBEZIUM_JSON), the default branch throws SeaTunnelJsonFormatException with code UNSUPPORTED_DATA_TYPE and message 'Unsupported format: <format>'.

Source

Thrown at seatunnel-connectors-v2/connector-amazonsqs/src/main/java/org/apache/seatunnel/connectors/seatunnel/amazonsqs/sink/AmazonSqsSinkWriter.java:125

        MessageFormat format = config.get(FORMAT);
        switch (format) {
            case JSON:
                return new JsonSerializationSchema(rowType);
            case TEXT:
                String delimiter = DEFAULT_FIELD_DELIMITER;
                if (config.get(FIELD_DELIMITER) != null) {
                    delimiter = config.get(FIELD_DELIMITER);
                }
                return TextSerializationSchema.builder()
                        .seaTunnelRowType(rowType)
                        .delimiter(delimiter)
                        .build();
            case CANAL_JSON:
                return new CanalJsonSerializationSchema(rowType);
            case DEBEZIUM_JSON:
                return new DebeziumJsonSerializationSchema(rowType);
            default:
                throw new SeaTunnelJsonFormatException(
                        CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE,
                        "Unsupported format: " + format);
        }
    }
}

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Set format to one of the supported values: json, canal_json, or debezium_json (check the connector doc for exact option names/values).
  2. Correct typos/casing in the format config option.
  3. If a format like CSV is needed, serialize to the required format upstream or use a transform before the sink.
  4. Check the SeaTunnel version's docs for the SQS sink's supported format list; upgrade only if a newer version adds the format.

Example fix

// before
format = csv
// after
format = json
Defensive patterns

Strategy: validation

Validate before calling

Set<String> supported = Set.of("json", "canal_json", "debezium_json");
if (!supported.contains(config.get("format"))) {
    throw new IllegalArgumentException("format must be one of " + supported);
}

Type guard

null

Try / catch

try { writer = new AmazonSqsSinkWriter(...); } catch (SeaTunnelJsonFormatException e) { log.error("Bad format config: {}", e.getMessage()); throw e; } // fail fast at job submit

Prevention

When it happens

Trigger: Configuring the SQS sink with a format value that parses to an enum constant outside the supported switch cases (typo, wrong-case entry, or a format this sink does not implement, e.g. csv or avro).

Common situations: Typo or unsupported format name in the sink config (format = jsonl, format = csv); copying a config from another connector that supports more formats; upgrading SeaTunnel and expecting a newly added format not yet supported by the SQS sink.

Related errors


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