{"record":{"id":"a1591b8ea39531f6","repo":"apache/seatunnel","slug":"unsupported-table-format-format-supported-for","errorCode":null,"errorMessage":"Unsupported table format: ${format}. Supported formats: PARQUET, ORC, TEXTFILE","messagePattern":"Unsupported table format: (.+?)\\. Supported formats: PARQUET, ORC, TEXTFILE","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/utils/HiveFormatUtils.java","lineNumber":39,"sourceCode":"import org.apache.hadoop.hive.metastore.api.StorageDescriptor;\n\npublic class HiveFormatUtils {\n\n    public static void configureStorageDescriptor(StorageDescriptor sd, String format) {\n        format = format.toUpperCase();\n\n        switch (format) {\n            case \"PARQUET\":\n                configureParquetFormat(sd);\n                break;\n            case \"ORC\":\n                configureOrcFormat(sd);\n                break;\n            case \"TEXTFILE\":\n                configureTextFileFormat(sd);\n                break;\n            default:\n                throw new IllegalArgumentException(\n                        \"Unsupported table format: \"\n                                + format\n                                + \". Supported formats: PARQUET, ORC, TEXTFILE\");\n        }\n    }\n\n    /** Configure Parquet format with default SNAPPY compression */\n    private static void configureParquetFormat(StorageDescriptor sd) {\n        sd.setInputFormat(\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\");\n        sd.setOutputFormat(\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\");\n\n        SerDeInfo serDeInfo = new SerDeInfo();\n        serDeInfo.setSerializationLib(\n                \"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\");\n        sd.setSerdeInfo(serDeInfo);\n    }\n\n    /** Configure ORC format with default ZLIB compression */","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/utils/HiveFormatUtils.java#L21-L57","documentation":"HiveFormatUtils.configureStorageDescriptor switches on the table's input/output format-derived format name and configures the storage descriptor accordingly. Only PARQUET, ORC, and TEXTFILE are supported; any other value hits the default branch and throws this IllegalArgumentException.","triggerScenarios":"Calling configureStorageDescriptor with a format string other than (case-insensitively normalized) PARQUET, ORC, or TEXTFILE — e.g. AVRO, SEQUENCEFILE, RCFILE, or a garbage value from the table's SerDe/inputformat mapping.","commonSituations":"Reading a Hive table stored in Avro or RCFile, tables with custom SerDes, or tables whose METASTORE input format does not map to one of the three supported formats.","solutions":["Convert the table to PARQUET, ORC, or TEXTFILE (CTAS: CREATE TABLE new_t STORED AS PARQUET AS SELECT * FROM t).","Point the connector at a different table that uses a supported format.","If you need AVRO/RCFILE support, extend the switch in HiveFormatUtils and contribute a PR.","Verify the table's input format class actually maps to one of the supported formats (check 'Storage Info' in SHOW CREATE TABLE)."],"exampleFix":"// before\nCREATE TABLE t STORED AS AVRO AS SELECT ...\n// after\nCREATE TABLE t STORED AS PARQUET AS SELECT ...","handlingStrategy":"validation","validationCode":"String fmt = tableFormat == null ? null : tableFormat.trim().toUpperCase();\nif (!java.util.Arrays.asList(\"PARQUET\",\"ORC\",\"TEXTFILE\").contains(fmt)) {\n    throw new IllegalArgumentException(\"convert table to PARQUET/ORC/TEXTFILE first; got: \" + tableFormat);\n}","typeGuard":null,"tryCatchPattern":"try {\n    HiveFormatUtils.configureStorageDescriptor(sd);\n} catch (IllegalArgumentException e) {\n    throw new IllegalStateException(\"Unsupported Hive table format; CTAS into PARQUET/ORC/TEXTFILE\", e);\n}","preventionTips":["Verify table input format via SHOW CREATE TABLE before reading with the Hive connector","CTAS unsupported-format tables into STORED AS PARQUET","Avoid custom SerDes on tables targeted by SeaTunnel"],"tags":["hive","format","unsupported"],"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"}