{"record":{"id":"f3ef90a532c198d0","repo":"apache/iceberg","slug":"unknown-file-format-s-f3ef90","errorCode":null,"errorMessage":"Unknown file format %s","messagePattern":"Unknown file format (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/sink/SinkUtil.java","lineNumber":151,"sourceCode":"        writeProperties.put(PARQUET_SHRED_VARIANTS, String.valueOf(conf.parquetShredVariants()));\n        writeProperties.put(\n            PARQUET_VARIANT_BUFFER_SIZE, String.valueOf(conf.parquetVariantInferenceBufferSize()));\n\n        break;\n      case AVRO:\n        writeProperties.put(AVRO_COMPRESSION, conf.avroCompressionCodec());\n        String avroCompressionLevel = conf.avroCompressionLevel();\n        if (avroCompressionLevel != null) {\n          writeProperties.put(AVRO_COMPRESSION_LEVEL, conf.avroCompressionLevel());\n        }\n\n        break;\n      case ORC:\n        writeProperties.put(ORC_COMPRESSION, conf.orcCompressionCodec());\n        writeProperties.put(ORC_COMPRESSION_STRATEGY, conf.orcCompressionStrategy());\n        break;\n      default:\n        throw new IllegalArgumentException(String.format(\"Unknown file format %s\", format));\n    }\n\n    return writeProperties;\n  }\n}\n","sourceCodeStart":133,"sourceCodeEnd":157,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/sink/SinkUtil.java#L133-L157","documentation":"SinkUtil.writeProperties builds per-format compression write properties for AVRO, PARQUET, and ORC; any other FileFormat hits the default branch and throws IllegalArgumentException. It guards against FileFormat values unknown to this Flink connector version.","triggerScenarios":"Calling SinkUtil.writeProperties with a format like AVIF or PUFFIN/other non-data formats, or a FileFormat added in a newer Iceberg spec while running an older connector.","commonSituations":"Programmatic table creation setting an exotic file format; copying format strings from another tool; version skew between table metadata and connector jars.","solutions":["Set the table's format property to avro, parquet, or orc","Upgrade the Iceberg Flink connector to a version that supports the requested format","Only call SinkUtil.writeProperties with FileFormat values intended for data files"],"exampleFix":"// before\ntableBuilder.format(\"avif\")\n// after\ntableBuilder.format(\"parquet\")","handlingStrategy":"validation","validationCode":"FileFormat fmt = FileFormat.fromString(table.properties().getOrDefault(TableProperties.DEFAULT_FILE_FORMAT, \"parquet\"));\nif (fmt != FileFormat.AVRO && fmt != FileFormat.PARQUET && fmt != FileFormat.ORC) {\n  throw new IllegalArgumentException(\"Flink sink supports only avro|parquet|orc, got: \" + fmt);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use FileFormat enum constants, never free-form strings, when configuring the table format","Check the connector version's supported formats before adopting new Iceberg formats","Keep default-file-format at parquet/orc/avro unless the connector explicitly supports otherwise"],"tags":["flink","file-format","configuration","enum-parsing"],"backgroundTag":"unsupported-enum-value","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T21:17:11.552Z"}