apache/seatunnel · warning

Csv file does not support this compress type

Error message

Csv file does not support this compress type: {}

What it means

Warning logged by CsvReadStrategy.wrapInputStream when the configured compress_codec cannot be handled for CSV reading. Unknown/unsupported CompressFormat values fall through the switch's default branch; the raw (still-compressed) input stream is used as-is, which usually causes downstream parse garbage rather than a hard failure.

Solutions

  1. Set compress_codec to a CSV-supported value: none, gzip, bzip2, lz4, or lzo (verify supported list in docs for your version).
  2. Decompress the files beforehand and read them uncompressed (compress_codec = none).
  3. If the codec is genuinely needed (e.g. snappy), pre-convert files to a supported compression or a different file_format_type that supports it.
  4. Check for typos in the compress_codec config value.

Example fix

// before
compress_codec = "snappy"
// after
compress_codec = "gzip"  # or none/pre-decompress
Defensive patterns

Strategy: validation

Validate before calling

Set<String> csvSupported = Set.of("none","gzip","bzip2","lz4","lzo");
if (!csvSupported.contains(config.getString("compress_codec"))) {
    throw new IllegalArgumentException("compress_codec not supported by CSV reader");
}

Prevention

When it happens

Trigger: compress_codec set to a value whose CompressFormat has no case in the CSV switch (anything other than LZO/LZ4/GZIP/BZIP2/NONE handled branches) — e.g. a codec added for other formats but not wired into the CSV reader, or a typo mapping to an unexpected enum default.

Common situations: Users setting compress_codec = zip or snappy for CSV where the CSV reader only supports a fixed set; config copied from a JSON/ORC source example that supports more codecs; upgraded enum values not yet supported by CSV path.

Related errors


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

Appendix: source

Thrown at seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/CsvReadStrategy.java:191

            throw new FileConnectorException(
                    FileConnectorErrorCode.DATA_DESERIALIZE_FAILED, errorMsg, e);
        }
    }

    private InputStream wrapInputStream(InputStream inputStream, FileSourceSplit split)
            throws IOException {
        InputStream resultStream;
        // process compression isnputStream
        switch (compressFormat) {
            case LZO:
                LzopCodec lzo = new LzopCodec();
                resultStream = lzo.createInputStream(inputStream);
                break;
            case NONE:
                resultStream = inputStream;
                break;
            default:
                log.warn(
                        "Csv file does not support this compress type: {}",
                        compressFormat.getCompressCodec());
                resultStream = inputStream;
                break;
        }
        // rebuild inputStream
        if (isSplitReadEnabled(split)) {
            resultStream = safeSlice(resultStream, split.getStart(), split.getLength());
        }
        return resultStream;
    }

    private boolean isSplitReadEnabled(FileSourceSplit split) {
        return enableSplitFile && split.getLength() > -1;
    }

    private CSVFormat getCSVFormat(FileSourceSplit split) {
        String quoteChar = readonlyConfig.get(FileBaseSourceOptions.QUOTE_CHAR);

View on GitHub (pinned to cf67b549a7)