apache/seatunnel · error · IllegalArgumentException
Unsupported table format: ${format}. Supported formats: PARQ
Error message
Unsupported table format: ${format}. Supported formats: PARQUET, ORC, TEXTFILE What it means
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.
Source
Thrown at seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/utils/HiveFormatUtils.java:39
import org.apache.hadoop.hive.metastore.api.StorageDescriptor;
public class HiveFormatUtils {
public static void configureStorageDescriptor(StorageDescriptor sd, String format) {
format = format.toUpperCase();
switch (format) {
case "PARQUET":
configureParquetFormat(sd);
break;
case "ORC":
configureOrcFormat(sd);
break;
case "TEXTFILE":
configureTextFileFormat(sd);
break;
default:
throw new IllegalArgumentException(
"Unsupported table format: "
+ format
+ ". Supported formats: PARQUET, ORC, TEXTFILE");
}
}
/** Configure Parquet format with default SNAPPY compression */
private static void configureParquetFormat(StorageDescriptor sd) {
sd.setInputFormat("org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat");
sd.setOutputFormat("org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat");
SerDeInfo serDeInfo = new SerDeInfo();
serDeInfo.setSerializationLib(
"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe");
sd.setSerdeInfo(serDeInfo);
}
/** Configure ORC format with default ZLIB compression */View on GitHub (pinned to cf67b549a7)
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).
Example fix
// before CREATE TABLE t STORED AS AVRO AS SELECT ... // after CREATE TABLE t STORED AS PARQUET AS SELECT ...
Defensive patterns
Strategy: validation
Validate before calling
String fmt = tableFormat == null ? null : tableFormat.trim().toUpperCase();
if (!java.util.Arrays.asList("PARQUET","ORC","TEXTFILE").contains(fmt)) {
throw new IllegalArgumentException("convert table to PARQUET/ORC/TEXTFILE first; got: " + tableFormat);
} Try / catch
try {
HiveFormatUtils.configureStorageDescriptor(sd);
} catch (IllegalArgumentException e) {
throw new IllegalStateException("Unsupported Hive table format; CTAS into PARQUET/ORC/TEXTFILE", e);
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- ILLEGAL_ARGUMENT
- ILLEGAL_ARGUMENT
- Hive `table_name` must use `databasePattern.tablePattern` wh
- Table format cannot be null or empty
- COMMON_ILLEGAL_ARGUMENT
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/a1591b8ea39531f6.
Report an issue: GitHub.