Interface DeltaWriter<T>

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable, org.apache.spark.sql.connector.write.DataWriter<T>

    public interface DeltaWriter<T>
    extends org.apache.spark.sql.connector.write.DataWriter<T>
    A data writer responsible for writing a delta of rows.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      void delete​(T metadata, T id)
      Passes information for a row that must be deleted.
      void insert​(T row)
      Passes a row to insert.
      void update​(T metadata, T id, T row)
      Passes information for a row that must be updated together with the updated row.
      default void write​(T row)  
      • Methods inherited from interface java.io.Closeable

        close
      • Methods inherited from interface org.apache.spark.sql.connector.write.DataWriter

        abort, commit, currentMetricsValues
    • Method Detail

      • delete

        void delete​(T metadata,
                    T id)
             throws java.io.IOException
        Passes information for a row that must be deleted.
        Parameters:
        metadata - values for metadata columns that were projected but are not part of the row ID
        id - a row ID to delete
        Throws:
        java.io.IOException - if the write process encounters an error
      • update

        void update​(T metadata,
                    T id,
                    T row)
             throws java.io.IOException
        Passes information for a row that must be updated together with the updated row.
        Parameters:
        metadata - values for metadata columns that were projected but are not part of the row ID
        id - a row ID to update
        row - a row with updated values
        Throws:
        java.io.IOException - if the write process encounters an error
      • insert

        void insert​(T row)
             throws java.io.IOException
        Passes a row to insert.
        Parameters:
        row - a row to insert
        Throws:
        java.io.IOException - if the write process encounters an error
      • write

        default void write​(T row)
                    throws java.io.IOException
        Specified by:
        write in interface org.apache.spark.sql.connector.write.DataWriter<T>
        Throws:
        java.io.IOException