Class BaseDatabaseStep

java.lang.Object
org.pentaho.di.trans.step.BaseStep
org.pentaho.di.trans.step.BaseDatabaseStep
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:
DatabaseJoin, DBProc, Delete, DimensionLookup, DynamicSQLRow, ExecSQLRow, GetTableNames, InsertUpdate, SynchronizeAfterMerge, TableExists, TableInput, TableOutput, Update

public abstract class BaseDatabaseStep extends BaseStep implements StepInterface
Base step extension that is responsible for Database connection and datasource management for steps that require it. handles common functionalities for steps that require Database connections.
  • Constructor Details

  • Method Details

    • init

      public boolean init(StepMetaInterface smi, StepDataInterface sdi)
      Description copied from interface: StepInterface
      Initialize and do work where other steps need to wait for...
      Specified by:
      init in interface StepInterface
      Overrides:
      init in class BaseStep
      Parameters:
      smi - The metadata to work with
      sdi - The data to initialize
    • dispose

      public void dispose(StepMetaInterface smi, StepDataInterface sdi)
      Description copied from interface: StepInterface
      Dispose of this step: close files, empty logs, etc.
      Specified by:
      dispose in interface StepInterface
      Overrides:
      dispose in class BaseStep
      Parameters:
      smi - The metadata to work with
      sdi - The data to dispose of
    • beforeStartProcessing

      public boolean beforeStartProcessing(StepMetaInterface smi, StepDataInterface sdi) throws org.pentaho.di.core.exception.KettleException
      Description copied from interface: StepInterface
      This method is executed by Trans right before starting processing rows.
      Specified by:
      beforeStartProcessing in interface StepInterface
      Overrides:
      beforeStartProcessing 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.)
      Throws:
      org.pentaho.di.core.exception.KettleException
    • connectToDatabaseOrInitDataSource

      public boolean connectToDatabaseOrInitDataSource(BaseDatabaseStepMeta meta, BaseDatabaseStepData data) throws org.pentaho.di.core.exception.KettleDatabaseException
      Throws:
      org.pentaho.di.core.exception.KettleDatabaseException
    • connectToDatabase

      protected boolean connectToDatabase(BaseDatabaseStepData data) throws org.pentaho.di.core.exception.KettleDatabaseException
      Throws:
      org.pentaho.di.core.exception.KettleDatabaseException
    • getPKG

      protected abstract Class<?> getPKG()
      Returns the specific step class needed for logging
      Returns:
      the specific step class needed for logging
    • isConnectToDatabaseOnInit

      protected boolean isConnectToDatabaseOnInit()
    • getStepExecutionId

      public String getStepExecutionId()