{"record":{"id":"732ff5a8ef0ddd87","repo":"apache/seatunnel","slug":"unsupported-transform","errorCode":null,"errorMessage":"Unsupported transform: ","messagePattern":"Unsupported transform: ","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/utils/SchemaUtils.java","lineNumber":364,"sourceCode":"                                break;\n                            case \"hour\":\n                            case \"hours\":\n                                specBuilder.hour(matcher.group(2));\n                                break;\n                            case \"bucket\":\n                                {\n                                    Pair<String, Integer> args = transformArgPair(matcher.group(2));\n                                    specBuilder.bucket(args.first(), args.second());\n                                    break;\n                                }\n                            case \"truncate\":\n                                {\n                                    Pair<String, Integer> args = transformArgPair(matcher.group(2));\n                                    specBuilder.truncate(args.first(), args.second());\n                                    break;\n                                }\n                            default:\n                                throw new UnsupportedOperationException(\n                                        \"Unsupported transform: \" + transform);\n                        }\n                    } else {\n                        specBuilder.identity(partitionField);\n                    }\n                });\n        return specBuilder.build();\n    }\n\n    private static Pair<String, Integer> transformArgPair(String argsStr) {\n        String[] parts = argsStr.split(\",\");\n        if (parts.length != 2) {\n            throw new IllegalArgumentException(\n                    \"Invalid argument \" + argsStr + \", should have 2 parts\");\n        }\n        return Pair.of(parts[0].trim(), Integer.parseInt(parts[1].trim()));\n    }\n}","sourceCodeStart":346,"sourceCodeEnd":382,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/utils/SchemaUtils.java#L346-L382","documentation":"SchemaUtils.createPartitionSpec parses a partition transform string (e.g. bucket[16,col], truncate[10,col], year, month, day, hour) from the SeaTunnel catalog partition key specification and maps it to Iceberg PartitionSpec builder calls. If the transform name is not one of the recognized switch cases, it throws UnsupportedOperationException with the raw transform string. The partition key uses an Iceberg transform the connector does not support.","triggerScenarios":"Configuring an Iceberg sink/catalog table partition property with a transform name outside the supported set (identity, year, month, day, hour, bucket[N], truncate[N]) — e.g. a typo like 'buket[16]', a plural like 'days', or unsupported transforms such as 'void'.","commonSituations":"Users copy partition syntax from other engines (Hive/Spark date_trunc style) that the connector's switch doesn't accept; typos in HOCON config; transforms valid in raw Iceberg API but missing a case in createPartitionSpec.","solutions":["Use a supported transform name exactly: identity, year, month, day, hour, bucket[N], truncate[N]","Fix typos in the partition config (the message echoes the offending transform string)","Map unsupported engine-specific transforms to the nearest Iceberg equivalent (e.g. date_trunc -> month/day/hour)","If a valid Iceberg transform is missing, add a case in createPartitionSpec's switch that calls specBuilder accordingly"],"exampleFix":"// before\npartition = { key = \"ts\"; transform = \"date_trunc[hour]\" }\n// after\npartition = { key = \"ts\"; transform = \"hour\" }","handlingStrategy":"validation","validationCode":"java.util.Set<String> supported = Set.of(\"identity\",\"year\",\"month\",\"day\",\"hour\",\"bucket\",\"truncate\");\nif (!supported.contains(transformName.toLowerCase())) {\n    throw new IllegalArgumentException(\"Unsupported transform: \" + transformName);\n}","typeGuard":null,"tryCatchPattern":"try {\n    Table table = catalog.createTable(...);\n} catch (UnsupportedOperationException e) {\n    log.error(\"Partition transform rejected: {}\", e.getMessage());\n    throw e;\n}","preventionTips":["Copy transform names only from the connector docs list: identity/year/month/day/hour/bucket/truncate","Add config schema validation that whitelists transform names before job submission","Beware plurals ('days') and typos ('buket') — validate against the exact enum","Test partition spec creation with a dry-run before production writes"],"tags":["iceberg","partitioning","unsupported-operation","config"],"backgroundTag":"invalid-enum-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}