{"record":{"id":"0dd375bfe4a5c75f","repo":"apache/flink","slug":"the-protobuf-format-is-not-supported-for-the-fi","errorCode":null,"errorMessage":"The 'protobuf' format is not supported for the 'filesystem' connector.","messagePattern":"The 'protobuf' format is not supported for the 'filesystem' connector\\.","errorType":"validation","errorClass":"ValidationException","httpStatus":null,"severity":"error","filePath":"flink-formats/flink-protobuf/src/main/java/org/apache/flink/formats/protobuf/PbFileFormatFactory.java","lineNumber":73,"sourceCode":"    @Override\n    public Set<ConfigOption<?>> requiredOptions() {\n        return Collections.emptySet();\n    }\n\n    @Override\n    public Set<ConfigOption<?>> optionalOptions() {\n        return Collections.emptySet();\n    }\n\n    @Override\n    public Set<ConfigOption<?>> forwardOptions() {\n        return Collections.emptySet();\n    }\n\n    @Override\n    public BulkDecodingFormat<RowData> createDecodingFormat(\n            DynamicTableFactory.Context context, ReadableConfig formatOptions) {\n        throw new ValidationException(\n                \"The 'protobuf' format is not supported for the 'filesystem' connector.\");\n    }\n\n    @Override\n    public EncodingFormat<Factory<RowData>> createEncodingFormat(\n            DynamicTableFactory.Context context, ReadableConfig formatOptions) {\n        throw new ValidationException(\n                \"The 'protobuf' format is not supported for the 'filesystem' connector.\");\n    }\n}\n","sourceCodeStart":55,"sourceCodeEnd":84,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-formats/flink-protobuf/src/main/java/org/apache/flink/formats/protobuf/PbFileFormatFactory.java#L55-L84","documentation":"PbFileFormatFactory implements FileSystemFormatFactory but protobuf decoding requires a complete serialized message per record, which the filesystem (bulk) connector cannot provide. Calling createDecodingFormat therefore always throws this ValidationException. It is a deliberate, documented limitation: the protobuf format only works with messaging connectors like Kafka.","triggerScenarios":"CREATE TABLE ... WITH ('connector'='filesystem', 'format'='protobuf'): during factory discovery the filesystem connector asks the format factory for a BulkDecodingFormat and this method throws.","commonSituations":"Copying a Kafka protobuf table DDL and only changing the connector to 'filesystem'; expecting to read protobuf payload files from object storage.","solutions":["Use the protobuf format with a message connector: 'connector'='kafka' (or kinesis/pulsar) instead of 'filesystem'.","If you must read length-delimited protobuf files, wrap them via a custom Source and PbRowDataDeserializationSchema.","Convert the data to a filesystem-supported format (orc/parquet/avro/csv/json) upstream."],"exampleFix":"-- before\nCREATE TABLE t (...) WITH (\n  'connector'='filesystem',\n  'path'='...',\n  'format'='protobuf'\n);\n-- after\nCREATE TABLE t (...) WITH (\n  'connector'='kafka',\n  'topic'='...',\n  'properties.bootstrap.servers'='...',\n  'format'='protobuf',\n  'protobuf.message-class-name'='com.example.MyMsg'\n);","handlingStrategy":"validation","validationCode":"-- Check before creating the table:\nSELECT * FROM table_options; -- ensure connector is kafka-like when format='protobuf'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remember format='protobuf' pairs only with message connectors (kafka, kinesis, pulsar).","Script DDL generation from connector capability checks instead of copy-pasting DDLs."],"tags":["protobuf","filesystem-connector","ddl","validation"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}