{"record":{"id":"4a31cee5851e3da5","repo":"apache/beam","slug":"orc-file-format-not-currently-supported","errorCode":null,"errorMessage":"ORC file format not currently supported.","messagePattern":"ORC file format not currently supported\\.","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/RecordWriter.java","lineNumber":120,"sourceCode":"                .withKeyMetadata(keyMetadata)\n                .overwrite()\n                .build();\n        break;\n      case PARQUET:\n        Parquet.DataWriteBuilder parquetBuilder =\n            Parquet.writeData(outputFile)\n                .forTable(table)\n                .createWriterFunc(GenericParquetWriter::create)\n                .withPartition(partitionKey)\n                .withKeyMetadata(keyMetadata)\n                .overwrite();\n        if (writeProperties != null && !writeProperties.isEmpty()) {\n          parquetBuilder.setAll(writeProperties);\n        }\n        icebergDataWriter = parquetBuilder.build();\n        break;\n      case ORC:\n        throw new UnsupportedOperationException(\"ORC file format not currently supported.\");\n      default:\n        throw new RuntimeException(\"Unknown File Format: \" + fileFormat);\n    }\n    activeIcebergWriters.inc();\n    LOG.info(\n        \"Opened {} writer for table '{}', partition {}. Writing to path: {}\",\n        fileFormat,\n        table.name(),\n        partitionKey,\n        absoluteFilename);\n  }\n\n  public void write(Record record) {\n\n    icebergDataWriter.write(record);\n  }\n\n  public void close() throws IOException {","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/RecordWriter.java#L102-L138","documentation":"RecordWriter's constructor selects an Iceberg DataWriter based on the table's FileFormat. Only AVRPC/Parquet-style writers are implemented; ORC is explicitly rejected with UnsupportedOperationException because the Beam Iceberg connector does not ship an ORC writer.","triggerScenarios":"Writing to an Iceberg table whose format is ORC — i.e. table.properties() format-version/write.format.default is 'orc' or the FileFormat passed to RecordWriter is FileFormat.ORC — while using the Beam Iceberg IO write path.","commonSituations":"Pointing Beam's Iceberg sink at an existing ORC table created by Spark/Flink; a table default write format set to ORC in table properties; migrating pipelines between engines with different default formats.","solutions":["Change the table's write format to Parquet: ALTER TABLE ... SET TBLPROPERTIES ('write.format.default'='parquet') or update table properties programmatically before writing","Create/use a Parquet-format Iceberg table for the Beam pipeline","Implement/patch RecordWriter to use Iceberg's ORC DataWriter (ORC.from(conf)) if ORC is mandatory","If the format comes from a catalog default, override the property per-table in your catalog configuration"],"exampleFix":"// before\nspark.sql(\"ALTER TABLE my_table SET TBLPROPERTIES ('write.format.default'='orc')\");\n// after\nspark.sql(\"ALTER TABLE my_table SET TBLPROPERTIES ('write.format.default'='parquet')\");","handlingStrategy":"validation","validationCode":"if (table.properties().getOrDefault(\"write.format.default\", \"parquet\").equalsIgnoreCase(\"orc\")) {\n  throw new IllegalArgumentException(\"Beam Iceberg IO cannot write ORC tables; use parquet\");\n}","typeGuard":"null","tryCatchPattern":"try {\n  writeResult = icebergIO.writeTo(table).expand(input);\n} catch (UnsupportedOperationException e) {\n  if (e.getMessage().contains(\"ORC\")) {\n    LOG.error(\"Target table is ORC; repoint pipeline to a parquet table\");\n  } else { throw e; }\n}","preventionTips":["Verify table write.format.default before wiring the Beam sink","Default new tables to parquet in catalog configuration","Document ORC as unsupported in pipeline requirements"],"tags":["java","iceberg","beam","orc","file-format","unsupported"],"backgroundTag":"operation-not-supported","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}