{"record":{"id":"e8c7d3d2f6c906dc","repo":"apache/seatunnel","slug":"format-not-support","errorCode":"FORMAT_NOT_SUPPORT","errorMessage":"SeaTunnel does not supported this file format: [<fileFormat>]","messagePattern":"SeaTunnel does not supported this file format: \\[<fileFormat>\\]","errorType":"error_code","errorClass":"FileConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/config/BaseFileSourceConfig.java","lineNumber":195,"sourceCode":"            case JSON:\n            case EXCEL:\n            case XML:\n                readStrategy.setCatalogTable(catalogTable);\n                return newCatalogTable(catalogTable, readStrategy.getActualSeaTunnelRowTypeInfo());\n            case ORC:\n            case PARQUET:\n            case BINARY:\n                return newCatalogTable(\n                        catalogTable,\n                        readStrategy.getSeaTunnelRowTypeInfoWithUserConfigRowType(\n                                filePaths.get(0),\n                                configSchema ? catalogTable.getSeaTunnelRowType() : null));\n            case MARKDOWN:\n            case PDF:\n                return newCatalogTable(\n                        catalogTable, readStrategy.getSeaTunnelRowTypeInfo(filePaths.get(0)));\n            default:\n                throw new FileConnectorException(\n                        FileConnectorErrorCode.FORMAT_NOT_SUPPORT,\n                        \"SeaTunnel does not supported this file format: [\" + fileFormat + \"]\");\n        }\n    }\n\n    /** Returns whether Markdown document routing and Knowledge Sync metadata are enabled. */\n    private boolean isMarkdownKnowledgeSyncMetadataEnabled(ReadonlyConfig readonlyConfig) {\n        return fileFormat == FileFormat.MARKDOWN\n                && readonlyConfig.get(FileBaseSourceOptions.MARKDOWN_RAG_METADATA_ENABLED);\n    }\n\n    private SeaTunnelRowType getSchemaForEmptyFilePath(ReadonlyConfig readonlyConfig) {\n        String rootPath = readonlyConfig.get(FileBaseSourceOptions.FILE_PATH);\n        return readStrategy.getSeaTunnelRowTypeInfo(rootPath);\n    }\n\n    private static String maskUriUserInfo(String rawPath) {\n        if (rawPath == null) {","sourceCodeStart":177,"sourceCodeEnd":213,"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/config/BaseFileSourceConfig.java#L177-L213","documentation":"parseCatalogTable in BaseFileSourceConfig resolves a read strategy from the configured file_format and builds a CatalogTable. If the file format is not one of the formats the connector knows how to read, the switch's default branch throws FileConnectorException with FORMAT_NOT_SUPPORT.","triggerScenarios":"Setting a file_format in the file source config that has no read branch in parseCatalogTable (i.e. a write-only format like canal_json/debezium_json/maxwell_json, or an unrecognized format value).","commonSituations":"Using a CDC JSON format (canal_json, debezium_json, maxwell_json) as a file source — these only support writing; misspelled file_format values; config copied from a sink into a source job.","solutions":["Change file_format to a readable format (e.g. text, csv, json, parquet, orc, excel, markdown) for source jobs.","If the data is canal/debezium/maxwell JSON, use a CDC connector (e.g. MySQL-CDC) instead of a file source.","Check the FileFormat enum for the exact supported format names and fix typos.","Upgrade SeaTunnel if support for the format was added in a newer release."],"exampleFix":"// before\nfile {\n  format = \"canal_json\"\n}\n// after\nfile {\n  format = \"json\"\n}","handlingStrategy":"validation","validationCode":"Set<String> READABLE_FORMATS = Set.of(\"text\",\"csv\",\"json\",\"parquet\",\"orc\",\"excel\",\"markdown\");\nString fmt = config.get(\"file_format\");\nif (!READABLE_FORMATS.contains(fmt)) {\n    throw new IllegalArgumentException(\"file_format '\" + fmt + \"' is not readable by a file source\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    parseCatalogTable(readonlyConfig);\n} catch (FileConnectorException e) {\n    if (FileConnectorErrorCode.FORMAT_NOT_SUPPORT.equals(e.getSeaTunnelErrorCode())) {\n        throw new IllegalArgumentException(\"Use a readable file_format: \" + e.getMessage(), e);\n    }\n    throw e;\n}","preventionTips":["Cross-check file_format names against the FileFormat enum/docs.","Remember CDC JSON formats (canal_json, debezium_json, maxwell_json) are sink-only.","Use a lint/CI step validating source configs against readable formats.","When copying sink configs to sources, always re-check the format field."],"tags":["file-connector","file-format","config"],"backgroundTag":"unsupported-enum-value","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"}