Class MonetDBBulkLoader

  • All Implemented Interfaces:
    org.pentaho.di.core.ExtensionDataInterface, HasLogChannelInterface, org.pentaho.di.core.logging.LoggingObjectInterface, org.pentaho.di.core.logging.LoggingObjectLifecycleInterface, org.pentaho.di.core.variables.VariableSpace, StepInterface
    Direct Known Subclasses:
    MonetDBAgileMart

    public class MonetDBBulkLoader
    extends BaseStep
    implements StepInterface
    Performs a bulk load to a MonetDB table.

    Based on (copied from) Sven Boden's Oracle Bulk Loader step

    Since:
    22-aug-2008
    Author:
    matt
    • Field Detail

      • rowsWritten

        protected long rowsWritten
    • Method Detail

      • getMessage

        public String getMessage()
      • setMessage

        protected void setMessage​(String message)
      • escapeOsPath

        protected String escapeOsPath​(String path,
                                      boolean isWindows)
      • execute

        public boolean execute​(MonetDBBulkLoaderMeta meta,
                               boolean wait)
                        throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • processRow

        public boolean processRow​(StepMetaInterface smi,
                                  StepDataInterface sdi)
                           throws org.pentaho.di.core.exception.KettleException
        Description copied from interface: StepInterface
        Perform the equivalent of processing one row. Typically this means reading a row from input (getRow()) and passing a row to output (putRow)).
        Specified by:
        processRow in interface StepInterface
        Overrides:
        processRow in class BaseStep
        Parameters:
        smi - The steps metadata to work with
        sdi - The steps temporary working data to work with (database connections, result sets, caches, temporary variables, etc.)
        Returns:
        false if no more rows can be processed or an error occurred.
        Throws:
        org.pentaho.di.core.exception.KettleException
      • writeRowToMonetDB

        protected void writeRowToMonetDB​(org.pentaho.di.core.row.RowMetaInterface rowMeta,
                                         Object[] r)
                                  throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • addRowToBuffer

        protected void addRowToBuffer​(org.pentaho.di.core.row.RowMetaInterface rowMeta,
                                      Object[] r)
                               throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • truncate

        public void truncate()
                      throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • drop

        public void drop()
                  throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • autoAdjustSchema

        public void autoAdjustSchema​(MonetDBBulkLoaderMeta meta)
                              throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • writeBufferToMonetDB

        protected void writeBufferToMonetDB()
                                     throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • verifyDatabaseConnection

        protected void verifyDatabaseConnection()
                                         throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • getMonetDBConnection

        protected nl.cwi.monetdb.mcl.net.MapiSocket getMonetDBConnection()
                                                                  throws Exception
        Throws:
        Exception
      • getMonetDBConnection

        protected static nl.cwi.monetdb.mcl.net.MapiSocket getMonetDBConnection​(String host,
                                                                                int port,
                                                                                String user,
                                                                                String password,
                                                                                String db,
                                                                                org.pentaho.di.core.logging.LogChannelInterface log)
                                                                         throws Exception
        Throws:
        Exception