org.pentaho.di.trans.steps.terafast
Class TeraFastMeta

java.lang.Object
  extended by org.pentaho.di.trans.step.BaseStepMeta
      extended by org.pentaho.di.core.util.AbstractStepMeta
          extended by org.pentaho.di.trans.steps.terafast.TeraFastMeta
All Implemented Interfaces:
Cloneable, StepAttributesInterface, StepMetaInterface

public class TeraFastMeta
extends AbstractStepMeta

Author:
Michael Gugerell(asc145)

Field Summary
static String DEFAULT_DATA_FILE
          Default data file.
static int DEFAULT_ERROR_LIMIT
          Default error limit.
static String DEFAULT_FASTLOAD_PATH
          Default fast load path.
static int DEFAULT_SESSIONS
          Default session.
static String DEFAULT_TARGET_TABLE
           
static boolean DEFAULT_TRUNCATETABLE
           
static boolean DEFAULT_VARIABLE_SUBSTITUTION
           
static PluginMessages MESSAGES
           
 
Fields inherited from class org.pentaho.di.trans.step.BaseStepMeta
loggingObject, STEP_ATTRIBUTES_FILE
 
Constructor Summary
TeraFastMeta()
           
 
Method Summary
 void check(List<CheckResultInterface> remarks, TransMeta transmeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info)
          Checks the settings of this step and puts the findings in a remarks List.
 Object clone()
          Make an exact copy of this step, make sure to explicitly copy Collections etc.
 Database connectToDatabase()
           
 StringPluginProperty getControlFile()
           
 StringPluginProperty getDataFile()
           
 IntegerPluginProperty getErrorLimit()
           
 StringPluginProperty getFastloadPath()
           
 void getFields(RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space)
          Get the fields that are emitted by this step
 StringPluginProperty getLogFile()
           
 String getQuotedSchemaTableName(VariableSpace space)
           
 RowMetaInterface getRequiredFields(VariableSpace space)
          The natural way of data flow in a transformation is source-to-target.
 IntegerPluginProperty getSessions()
           
 StepInterface getStep(StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta transMeta, Trans disp)
          Get the executing step, needed by Trans to launch a step.
 StepDataInterface getStepData()
          Get a new instance of the appropriate data class.
 StringListPluginProperty getStreamFieldList()
           
 StringListPluginProperty getTableFieldList()
           
 StringPluginProperty getTargetTable()
           
 BooleanPluginProperty getTruncateTable()
           
 BooleanPluginProperty getUseControlFile()
           
 BooleanPluginProperty getVariableSubstitution()
           
 void setControlFile(StringPluginProperty controlFile)
           
 void setDataFile(StringPluginProperty dataFile)
           
 void setDefault()
          Set default values
 void setErrorLimit(IntegerPluginProperty errorLimit)
           
 void setFastloadPath(StringPluginProperty fastloadPath)
           
 void setLogFile(StringPluginProperty logFile)
           
 void setSessions(IntegerPluginProperty sessions)
           
 void setStreamFieldList(StringListPluginProperty streamFieldList)
           
 void setTableFieldList(StringListPluginProperty tableFieldList)
           
 void setTargetTable(StringPluginProperty targetTable)
           
 void setTruncateTable(BooleanPluginProperty truncateTable)
           
 void setUseControlFile(BooleanPluginProperty useControlFile)
           
 void setVariableSubstitution(BooleanPluginProperty variableSubstitution)
           
 
Methods inherited from class org.pentaho.di.core.util.AbstractStepMeta
getConnectionName, getDbMeta, getProperties, getPropertyFactory, getXML, loadXML, readFromPreferences, readRep, saveAsPreferences, saveRep, setConnectionName, setDbMeta
 
Methods inherited from class org.pentaho.di.trans.step.BaseStepMeta
analyseImpact, cancelQueries, excludeFromCopyDistributeVerification, excludeFromRowLayoutVerification, exportResources, findAttribute, findParent, getDescription, getDialogClassName, getLog, getLogChannelId, getName, getObjectCopy, getObjectId, getObjectRevision, getObjectType, getOptionalStreams, getParent, getParentStepMeta, getRepCode, getRepositoryDirectory, getRequiredFields, getResourceDependencies, getSQLStatements, getStepInjectionMetadataEntries, getStepIOMeta, getStepMetaInjectionInterface, getSupportedTransformationTypes, getTableFields, getTooltip, getUsedArguments, getUsedDatabaseConnections, getUsedLibraries, getXmlCode, handleStreamSelection, hasChanged, hasRepositoryReferences, isBasic, isDebug, isDetailed, isRowLevel, logBasic, logBasic, logDebug, logDebug, logDetailed, logDetailed, logError, logError, logError, logMinimal, logMinimal, logRowlevel, logRowlevel, lookupRepositoryReferences, resetStepIoMeta, searchInfoAndTargetSteps, setChanged, setChanged, setParentStepMeta, supportsErrorHandling
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.pentaho.di.trans.step.StepMetaInterface
analyseImpact, cancelQueries, excludeFromCopyDistributeVerification, excludeFromRowLayoutVerification, exportResources, getDialogClassName, getOptionalStreams, getParentStepMeta, getResourceDependencies, getSQLStatements, getStepIOMeta, getStepMetaInjectionInterface, getSupportedTransformationTypes, getTableFields, getUsedArguments, getUsedDatabaseConnections, getUsedLibraries, handleStreamSelection, hasRepositoryReferences, lookupRepositoryReferences, resetStepIoMeta, searchInfoAndTargetSteps, setParentStepMeta, supportsErrorHandling
 

Field Detail

MESSAGES

public static final PluginMessages MESSAGES

DEFAULT_FASTLOAD_PATH

public static final String DEFAULT_FASTLOAD_PATH
Default fast load path.

See Also:
Constant Field Values

DEFAULT_DATA_FILE

public static final String DEFAULT_DATA_FILE
Default data file.

See Also:
Constant Field Values

DEFAULT_TARGET_TABLE

public static final String DEFAULT_TARGET_TABLE
See Also:
Constant Field Values

DEFAULT_SESSIONS

public static final int DEFAULT_SESSIONS
Default session.

See Also:
Constant Field Values

DEFAULT_TRUNCATETABLE

public static final boolean DEFAULT_TRUNCATETABLE
See Also:
Constant Field Values

DEFAULT_VARIABLE_SUBSTITUTION

public static final boolean DEFAULT_VARIABLE_SUBSTITUTION
See Also:
Constant Field Values

DEFAULT_ERROR_LIMIT

public static final int DEFAULT_ERROR_LIMIT
Default error limit.

See Also:
Constant Field Values
Constructor Detail

TeraFastMeta

public TeraFastMeta()
Method Detail

check

public void check(List<CheckResultInterface> remarks,
                  TransMeta transmeta,
                  StepMeta stepMeta,
                  RowMetaInterface prev,
                  String[] input,
                  String[] output,
                  RowMetaInterface info)
Checks the settings of this step and puts the findings in a remarks List.

Parameters:
remarks - The list to put the remarks in @see org.pentaho.di.core.CheckResult
stepMeta - The stepMeta to help checking
prev - The fields coming from the previous step
input - The input step names
output - The output step names
info - The fields that are used as information by the step
See Also:
StepMetaInterface.check(java.util.List, org.pentaho.di.trans.TransMeta, org.pentaho.di.trans.step.StepMeta, org.pentaho.di.core.row.RowMetaInterface, java.lang.String[], java.lang.String[], org.pentaho.di.core.row.RowMetaInterface)

getQuotedSchemaTableName

public String getQuotedSchemaTableName(VariableSpace space)
                                throws KettleException
Parameters:
space - the variableSpace to be used.
Returns:
the quoted and resolved schema table name.
Throws:
KettleException - if no table specified.

connectToDatabase

public Database connectToDatabase()
                           throws KettleException
Returns:
the database.
Throws:
KettleException - if an error occurs.

getStep

public StepInterface getStep(StepMeta stepMeta,
                             StepDataInterface stepDataInterface,
                             int cnr,
                             TransMeta transMeta,
                             Trans disp)
Get the executing step, needed by Trans to launch a step.

Parameters:
stepMeta - The step info
stepDataInterface - the step data interface linked to this step. Here the step can store temporary data, database connections, etc.
cnr - The copy nr to get
transMeta - The transformation info
disp - The launching transformation
See Also:
StepMetaInterface.getStep(org.pentaho.di.trans.step.StepMeta, org.pentaho.di.trans.step.StepDataInterface, int, org.pentaho.di.trans.TransMeta, org.pentaho.di.trans.Trans)

getStepData

public StepDataInterface getStepData()
Get a new instance of the appropriate data class. This data class implements the StepDataInterface. It basically contains the persisting data that needs to live on, even if a worker thread is terminated.

Specified by:
getStepData in interface StepMetaInterface
Overrides:
getStepData in class AbstractStepMeta
Returns:
The appropriate StepDataInterface class.
See Also:
StepMetaInterface.getStepData()

setDefault

public void setDefault()
Set default values

See Also:
StepMetaInterface.setDefault()

getFields

public void getFields(RowMetaInterface inputRowMeta,
                      String name,
                      RowMetaInterface[] info,
                      StepMeta nextStep,
                      VariableSpace space)
               throws KettleStepException
Get the fields that are emitted by this step

Specified by:
getFields in interface StepMetaInterface
Overrides:
getFields in class BaseStepMeta
Parameters:
inputRowMeta - The fields that are entering the step. These are changed to reflect the output metadata.
name - The name of the step to be used as origin
info - The input rows metadata that enters the step through the specified channels in the same order as in method getInfoSteps(). The step metadata can then choose what to do with it: ignore it or not. Interesting is also that in case of database lookups, the layout of the target database table is put in info[0]
nextStep - if this is a non-null value, it's the next step in the transformation. The one who's asking, the step where the data is targetted towards.
space - TODO
Throws:
KettleStepException - when an error occurred searching for the fields.
See Also:
BaseStepMeta.getFields(org.pentaho.di.core.row.RowMetaInterface, java.lang.String, org.pentaho.di.core.row.RowMetaInterface[], org.pentaho.di.trans.step.StepMeta, org.pentaho.di.core.variables.VariableSpace)

getRequiredFields

public RowMetaInterface getRequiredFields(VariableSpace space)
                                   throws KettleException
The natural way of data flow in a transformation is source-to-target. However, this makes mapping to target tables difficult to do. To help out here, we supply information to the transformation meta-data model about which fields are required for a step. This allows us to automate certain tasks like the mapping to pre-defined tables. The Table Output step in this case will output the fields in the target table using this method. This default implementation returns an empty row meaning that no fields are required for this step to operate.

Specified by:
getRequiredFields in interface StepMetaInterface
Overrides:
getRequiredFields in class BaseStepMeta
Parameters:
space - the variable space to use to do variable substitution.
Returns:
the required fields for this steps meta data.
Throws:
KettleException - in case the required fields can't be determined
See Also:
BaseStepMeta.getRequiredFields(org.pentaho.di.core.variables.VariableSpace)

clone

public Object clone()
Make an exact copy of this step, make sure to explicitly copy Collections etc.

Specified by:
clone in interface StepMetaInterface
Overrides:
clone in class BaseStepMeta
Returns:
an exact copy of this step
See Also:
BaseStepMeta.clone()

getFastloadPath

public StringPluginProperty getFastloadPath()
Returns:
the fastloadPath

setFastloadPath

public void setFastloadPath(StringPluginProperty fastloadPath)
Parameters:
fastloadPath - the fastloadPath to set

getControlFile

public StringPluginProperty getControlFile()
Returns:
the controlFile

setControlFile

public void setControlFile(StringPluginProperty controlFile)
Parameters:
controlFile - the controlFile to set

getDataFile

public StringPluginProperty getDataFile()
Returns:
the dataFile

setDataFile

public void setDataFile(StringPluginProperty dataFile)
Parameters:
dataFile - the dataFile to set

getLogFile

public StringPluginProperty getLogFile()
Returns:
the logFile

setLogFile

public void setLogFile(StringPluginProperty logFile)
Parameters:
logFile - the logFile to set

getSessions

public IntegerPluginProperty getSessions()
Returns:
the sessions

setSessions

public void setSessions(IntegerPluginProperty sessions)
Parameters:
sessions - the sessions to set

getErrorLimit

public IntegerPluginProperty getErrorLimit()
Returns:
the errorLimit

setErrorLimit

public void setErrorLimit(IntegerPluginProperty errorLimit)
Parameters:
errorLimit - the errorLimit to set

getUseControlFile

public BooleanPluginProperty getUseControlFile()
Returns:
the useControlFile

setUseControlFile

public void setUseControlFile(BooleanPluginProperty useControlFile)
Parameters:
useControlFile - the useControlFile to set

getTargetTable

public StringPluginProperty getTargetTable()
Returns:
the targetTable

setTargetTable

public void setTargetTable(StringPluginProperty targetTable)
Parameters:
targetTable - the targetTable to set

getTruncateTable

public BooleanPluginProperty getTruncateTable()
Returns:
the truncateTable

setTruncateTable

public void setTruncateTable(BooleanPluginProperty truncateTable)
Parameters:
truncateTable - the truncateTable to set

getTableFieldList

public StringListPluginProperty getTableFieldList()
Returns:
the tableFieldList

setTableFieldList

public void setTableFieldList(StringListPluginProperty tableFieldList)
Parameters:
tableFieldList - the tableFieldList to set

getStreamFieldList

public StringListPluginProperty getStreamFieldList()
Returns:
the streamFieldList

setStreamFieldList

public void setStreamFieldList(StringListPluginProperty streamFieldList)
Parameters:
streamFieldList - the streamFieldList to set

getVariableSubstitution

public BooleanPluginProperty getVariableSubstitution()
Returns:
the variableSubstitution

setVariableSubstitution

public void setVariableSubstitution(BooleanPluginProperty variableSubstitution)
Parameters:
variableSubstitution - the variableSubstitution to set