[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Class PslWrite (1.0.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0 (latest)](/java/docs/reference/pubsublite-spark-sql-streaming/latest/com.google.cloud.pubsublite.spark.PslWrite)\n- [0.4.5](/java/docs/reference/pubsublite-spark-sql-streaming/0.4.5/com.google.cloud.pubsublite.spark.PslWrite)\n- [0.3.4](/java/docs/reference/pubsublite-spark-sql-streaming/0.3.4/com.google.cloud.pubsublite.spark.PslWrite) \n\n public class PslWrite implements WriteBuilder, SupportsStreamingUpdateAsAppend, BatchWrite, StreamingWrite\n\nPub/Sub Lite class for writing.\n\nNote that SupportsStreamingUpdateAsAppend is the same hack that [kafka](https://github.com/apache/spark/commit/db89b0e1b8bb98db6672f2b89e42e8a14e06e745)\nuses to opt-in to writing aggregates without requiring windowing. \n\nInheritance\n-----------\n\njava.lang.Object \\\u003e PslWrite \n\nImplements\n----------\n\norg.apache.spark.sql.connector.write.WriteBuilder, org.apache.spark.sql.internal.connector.SupportsStreamingUpdateAsAppend, org.apache.spark.sql.connector.write.BatchWrite, org.apache.spark.sql.connector.write.streaming.StreamingWrite \n\nInherited Members\n-----------------\n\n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nConstructors\n------------\n\n### PslWrite(StructType inputSchema, PslWriteDataSourceOptions writeOptions)\n\n public PslWrite(StructType inputSchema, PslWriteDataSourceOptions writeOptions)\n\nMethods\n-------\n\n### abort(long epochId, WriterCommitMessage\\[\\] messages)\n\n public void abort(long epochId, WriterCommitMessage[] messages)\n\n### abort(WriterCommitMessage\\[\\] messages)\n\n public void abort(WriterCommitMessage[] messages)\n\n### buildForBatch()\n\n public BatchWrite buildForBatch()\n\n### buildForStreaming()\n\n public StreamingWrite buildForStreaming()\n\n### commit(long epochId, WriterCommitMessage\\[\\] messages)\n\n public void commit(long epochId, WriterCommitMessage[] messages)\n\n### commit(WriterCommitMessage\\[\\] messages)\n\n public void commit(WriterCommitMessage[] messages)\n\n### createBatchWriterFactory(PhysicalWriteInfo info)\n\n public DataWriterFactory createBatchWriterFactory(PhysicalWriteInfo info)\n\n### createStreamingWriterFactory(PhysicalWriteInfo info)\n\n public StreamingDataWriterFactory createStreamingWriterFactory(PhysicalWriteInfo info)"]]