Documentation of 'com.ziclix.python.sql.pipe.db.DBSink' Java class
DBSink
com.ziclix.python.sql.pipe.db

Class DBSink

  • All Implemented Interfaces:
    Sink


    public class DBSink
    extends BaseDB
    implements Sink
    A database consumer. All data transferred will be inserted into the appropriate table.
    • Constructor Summary

      Constructors 
      Constructor and Description
      DBSink(PyConnection connection, java.lang.Class dataHandler, java.lang.String tableName, PyObject exclude, PyObject bindings, int batchsize)
      Constructor for handling the consumption of data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void end()
      Handles flushing any buffers and closes the cursor.
      void row(PyObject row)
      Handle the row.
      void start()
      Method start
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DBSink

        public DBSink(PyConnection connection,
                      java.lang.Class dataHandler,
                      java.lang.String tableName,
                      PyObject exclude,
                      PyObject bindings,
                      int batchsize)
        Constructor for handling the consumption of data.
        Parameters:
        connection - the database connection
        dataHandler - a custom DataHandler for the cursor, can be None
        tableName - the table to insert the data
        exclude - the columns to be excluded from insertion on the destination, all if None
        bindings - the optional bindings for the destination, this allows morphing of types during the copy
        batchsize - the optional batchsize for the inserts
    • Method Detail

      • row

        public void row(PyObject row)
        Handle the row. Insert the data into the correct table and columns. No updates are done.
        Specified by:
        row in interface Sink
      • start

        public void start()
        Method start
        Specified by:
        start in interface Sink
      • end

        public void end()
        Handles flushing any buffers and closes the cursor.
        Specified by:
        end in interface Sink

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.