{"record":{"id":"f538d991c72d3d39","repo":"apache/flink","slug":"sink-with-pre-write-topology-is-not-supported-for","errorCode":null,"errorMessage":"Sink with pre-write topology is not supported for DataStream v2 atm.","messagePattern":"Sink with pre-write topology is not supported for DataStream v2 atm\\.","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"flink-datastream/src/main/java/org/apache/flink/streaming/runtime/translators/DataStreamV2SinkTransformationTranslator.java","lineNumber":186,"sourceCode":"                    };\n            DataStream<CommittableMessage<CommT>> committableMessageDataStream =\n                    preCommittingSink.addPreCommitTopology(\n                            new DataStream<>(\n                                    new StreamExecutionEnvironment(), dummyTransformation));\n            return committableMessageDataStream\n                    .getExecutionEnvironment()\n                    .getTransformations()\n                    .isEmpty();\n        }\n\n        private void expand() {\n\n            final int sizeBefore = executionEnvironment.getTransformations().size();\n\n            AbstractDataStream<T> prewritten = inputStream;\n\n            if (sink instanceof SupportsPreWriteTopology) {\n                throw new UnsupportedOperationException(\n                        \"Sink with pre-write topology is not supported for DataStream v2 atm.\");\n            } else if (sink instanceof SupportsPreCommitTopology) {\n                if (sink.getClass()\n                        .getName()\n                        .equals(\"org.apache.flink.connector.file.sink.FileSink\")) {\n                    if (!checkSinkDoNotAddCommitTopology(sink)) {\n                        throw new UnsupportedOperationException(\n                                \"Sink with pre-commit topology is not supported for DataStream v2 atm.\");\n                    }\n                } else {\n                    throw new UnsupportedOperationException(\n                            \"Sink with pre-commit topology is not supported for DataStream v2 atm.\");\n                }\n            } else if (sink instanceof SupportsPostCommitTopology) {\n                throw new UnsupportedOperationException(\n                        \"Sink with post-commit topology is not supported for DataStream v2 atm.\");\n            }\n","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-datastream/src/main/java/org/apache/flink/streaming/runtime/translators/DataStreamV2SinkTransformationTranslator.java#L168-L204","documentation":"Error \"Sink with pre-write topology is not supported for DataStream v2 atm.\" thrown in apache/flink.","triggerScenarios":"Triggered at runtime when the operation fails because: Sink with pre-write topology is not supported for DataStream v2 atm.","commonSituations":"Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Sink with pre-write topology is not supported for DataStream v2 atm.","solutions":["Address the cause reported by the error message: Sink with pre-write topology is not supported for DataStream v2 atm.","Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry."],"exampleFix":"Correct the condition described (\"Sink with pre-write topology is not supported for DataStream v2 atm.\") and rerun the job or command.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}