{"record":{"id":"ae0d24de3dae2180","repo":"apache/seatunnel","slug":"the-file-format-is-incorrect-please-check-the","errorCode":null,"errorMessage":"The {} file format is incorrect. Please check the format in the compressed file.","messagePattern":"The (.+?) file format is incorrect\\. Please check the format in the compressed file\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/AbstractReadStrategy.java","lineNumber":697,"sourceCode":"                        String.format(\n                                \"Archived entry exceeds %,d bytes (POI limit). \"\n                                        + \"Please set excel_engine = EasyExcel, or increase the limit if POI is required.\",\n                                maxBytes));\n            }\n            byteArrayOutputStream.write(buffer, 0, bytesRead);\n        }\n\n        return new ByteArrayInputStream(byteArrayOutputStream.toByteArray());\n    }\n\n    protected boolean checkFileType(String fileName, FileFormat fileFormat) {\n        for (String suffix : fileFormat.getAllSuffix()) {\n            if (fileName.endsWith(suffix)) {\n                return true;\n            }\n        }\n\n        log.warn(\n                \"The {} file format is incorrect. Please check the format in the compressed file.\",\n                fileName);\n        return false;\n    }\n\n    protected static InputStream safeSlice(InputStream in, long start, long length)\n            throws IOException {\n        if (start > 0) {\n            if (in instanceof Seekable) {\n                ((Seekable) in).seek(start);\n            } else {\n                long toSkip = start;\n                while (toSkip > 0) {\n                    long skipped = in.skip(toSkip);\n                    if (skipped <= 0) {\n                        throw new SeaTunnelException(\"skipped error\");\n                    }\n                    toSkip -= skipped;","sourceCodeStart":679,"sourceCodeEnd":715,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/AbstractReadStrategy.java#L679-L715","documentation":"A warning logged by AbstractReadStrategy's compressed-file filter check. When reading files inside a compressed archive, the reader checks whether the inner file name ends with one of the configured file format's suffixes (file.getAllSuffix()). If no suffix matches, it logs this warning and excludes the file from reading.","triggerScenarios":"A compressed archive (zip/gzip/tar etc.) is read with compress_codec enabled, and an entry inside the archive has a file name that does not end with any suffix configured for the chosen file_format_type (e.g. an inner file named 'data.dat' while file_type=text expects .txt/.csv/.json suffixes).","commonSituations":"Archives containing mixed file types (images, metadata, README files) where non-data files are silently skipped; users renaming data files to extensionless names; mismatch between file_format_type config and actual inner file extensions.","solutions":["Rename the inner files in the archive so they carry the suffix expected by the configured file_format_type (e.g. .csv, .json, .txt).","Check file_format_type and its associated suffix options in the source config to ensure they match the compressed content.","Pre-extract the archive and only re-compress the files matching the expected format, or filter archives before ingestion.","If skipping is expected behavior, ignore the warning — the file is simply excluded from the read set."],"exampleFix":"// before\nfile_format_type = \"text\"  # archive contains data.dat\n// after\n# rename entry inside archive to data.txt, or set format suffixes to include .dat","handlingStrategy":"validation","validationCode":"// before configuring archive reads\nList<String> entries = listArchiveEntries(path);\nSet<String> suffixes = fileFormat.getAllSuffix();\nList<String> bad = entries.stream()\n    .filter(e -> suffixes.stream().noneMatch(e::endsWith))\n    .collect(Collectors.toList());\nif (!bad.isEmpty()) { /* rename, exclude, or fix file_format_type */ }","typeGuard":"boolean hasKnownSuffix(String name, List<String> suffixes) {\n    return suffixes != null && suffixes.stream().anyMatch(name::endsWith);\n}","tryCatchPattern":null,"preventionTips":["Match inner archive file names to the configured file_format_type suffixes.","Prefer explicitly filtering archives to only data files before ingestion.","Treat this warning as an exclusion notice, not a failure."],"tags":["file","compression","file-format","logging"],"backgroundTag":"invalid-argument-format","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}