Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pentaho.di.trans.step
Interface StepMetaInterface

All Known Subinterfaces:
  InputFileMetaInterface

All Known Implementing Classes:
  AbortMeta, AccessInputMeta, AccessOutputMeta, AddSequenceMeta, AddXMLMeta, AggregateRowsMeta, AnalyticQueryMeta, AppendMeta, BlockingStepMeta, CalculatorMeta, CheckSumMeta, CloneRowMeta, ClosureGeneratorMeta, ColumnExistsMeta, CombinationLookupMeta, ConstantMeta, CreditCardValidatorMeta, CsvInputMeta, CubeInputMeta, CubeOutputMeta, DatabaseJoinMeta, DatabaseLookupMeta, DBProcMeta, DelayMeta, DeleteMeta, DenormaliserMeta, DetectEmptyStreamMeta, DetectLastRowMeta, DimensionLookupMeta, DummyTransMeta, DynamicSQLRowMeta, ExcelInputMeta, ExcelOutputMeta, ExecProcessMeta, ExecSQLMeta, ExecSQLRowMeta, FieldSplitterMeta, FileExistsMeta, FilesFromResultMeta, FilesToResultMeta, FilterRowsMeta, FixedInputMeta, FlattenerMeta, FormulaMeta, GetFileNamesMeta, GetFilesRowsCountMeta, GetPreviousRowFieldMeta, GetSubFoldersMeta, GetVariableMeta, GetXMLDataMeta, GPBulkLoaderMeta, GroupByMeta, HTTPMeta, HTTPPOSTMeta, IfNullMeta, InfobrightLoaderMeta, InjectorMeta, InsertUpdateMeta, JaninoMeta, JoinRowsMeta, LDAPInputMeta, LDIFInputMeta, LucidDBBulkLoaderMeta, MailMeta, MailValidatorMeta, MappingInputMeta, MappingMeta, MappingOutputMeta, MergeJoinMeta, MergeRowsMeta, MondrianInputMeta, MonetDBBulkLoaderMeta, MySQLBulkLoaderMeta, NormaliserMeta, NullIfMeta, NumberRangeMeta, OraBulkLoaderMeta, ParGzipCsvInputMeta, PGBulkLoaderMeta, ProcessFilesMeta, PropertyInputMeta, PropertyOutputMeta, RandomValueMeta, RegexEvalMeta, ReplaceStringMeta, ReservoirSamplingMeta, RowGeneratorMeta, RowsFromResultMeta, RowsToResultMeta, RssInputMeta, RssOutputMeta, SalesforceInputMeta, SampleRowsMeta, ScriptValuesMetaMod, SelectValuesMeta, SetValueConstantMeta, SetValueFieldMeta, SetVariableMeta, SocketReaderMeta, SocketWriterMeta, SortedMergeMeta, SortRowsMeta, SplitFieldToRowsMeta, SQLFileOutputMeta, StepMetastructureMeta, StreamLookupMeta, StringCutMeta, SwitchCaseMeta, SynchronizeAfterMergeMeta, SystemDataMeta, TableExistsMeta, TableInputMeta, TableOutputMeta, TextFileInputMeta, TextFileOutputMeta, UniqueRowsByHashSetMeta, UniqueRowsMeta, UnivariateStatsMeta, UpdateMeta, ValidatorMeta, ValueMapperMeta, WebServiceMeta, WriteToLogMeta, XBaseInputMeta, XMLInputMeta, XMLInputSaxMeta, XMLJoinMeta, XMLOutputMeta, XsdValidatorMeta, XsltMeta

    public interface StepMetaInterface

This interface allows custom steps to talk to Kettle.

Since:
  4-aug-2004
Author:
  Matt

Method Summary
`void` | `analyseImpact(List<DatabaseImpact> impact, TransMeta transMeta, StepMeta stepMeta, org.pentaho.di.core.row.RowMetaInterface prev, String[] input, String[] output, org.pentaho.di.core.row.RowMetaInterface info)` Each step must be able to report on the impact it has on a database, table field, etc.
`void` | `cancelQueries()` Call this to cancel trailing database queries (too long running, etc)
`void` | `check(List<org.pentaho.di.core.CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, org.pentaho.di.core.row.RowMetaInterface prev, String[] input, String[] output, org.pentaho.di.core.row.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.
`boolean` | `excludeFromRowLayoutVerification()` This method is added to exclude certain steps from layout checking.
`String` | `exportResources(org.pentaho.di.core.variables.VariableSpace space, Map<String,ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository)`
`String` | `getDialogClassName()` Get the name of the class that implements the dialog for this job entry JobEntryBase provides a default
`void` | `getFields(org.pentaho.di.core.row.RowMetaInterface inputRowMeta, String name, org.pentaho.di.core.row.RowMetaInterface[] info, StepMeta nextStep, org.pentaho.di.core.variables.VariableSpace space)` Get the fields that are emitted by this step
`String[]` | `getInfoSteps()`
`org.pentaho.di.core.row.RowMetaInterface` | `getRequiredFields()` Deprecated. please use the method with the variable space in it so we can do variable substitution.
`org.pentaho.di.core.row.RowMetaInterface` | `getRequiredFields(org.pentaho.di.core.variables.VariableSpace space)` The natural way of data flow in a transformation is source-to-target.
`List<ResourceReference>` | `getResourceDependencies(TransMeta transMeta, StepMeta stepMeta)` Get a list of all the resource dependencies that the step is depending on.
`org.pentaho.di.core.SQLStatement` | `getSQLStatements(TransMeta transMeta, StepMeta stepMeta, org.pentaho.di.core.row.RowMetaInterface prev)` Standard method to return an SQLStatement object with SQL statements that the step needs in order to work correctly.
`StepInterface` | `getStep(StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta, Trans trans)` Get the executing step, needed by Trans to launch a step.
`StepDataInterface` | `getStepData()` Get a new instance of the appropriate data class.
`org.pentaho.di.core.row.RowMetaInterface` | `getTableFields()`
`String[]` | `getTargetSteps()`
`Map<String,String>` | `getUsedArguments()` Default a step doesn't use any arguments.
`org.pentaho.di.core.database.DatabaseMeta[]` | `getUsedDatabaseConnections()` This method returns all the database connections that are used by the step.
`String[]` | `getUsedLibraries()`
`String` | `getXML()` Get the XML that represents the values in this step
`void` | `loadXML(Node stepnode, List<org.pentaho.di.core.database.DatabaseMeta> databases, Map<String,org.pentaho.di.core.Counter> counters)` Load the values for this step from an XML Node
`void` | `readRep(Repository rep, long id_step, List<org.pentaho.di.core.database.DatabaseMeta> databases, Map<String,org.pentaho.di.core.Counter> counters)` Read the steps information from a Kettle repository
`void` | `saveRep(Repository rep, long id_transformation, long id_step)` Save the steps data into a Kettle repository
`void` | `searchInfoAndTargetSteps(List<StepMeta> steps)`
`void` | `setDefault()` Set default values
`void` | `setInfoSteps(StepMeta[] infoSteps)`
`void` | `setTargetSteps(StepMeta[] targetSteps)`
`boolean` | `supportsErrorHandling()`

Method Detail

### setDefault

    void setDefault()

  Set default values

### getFields

    void getFields(org.pentaho.di.core.row.RowMetaInterface inputRowMeta,
                   String name,
                   org.pentaho.di.core.row.RowMetaInterface[] info,
                   StepMeta nextStep,
                   org.pentaho.di.core.variables.VariableSpace space)
                   throws org.pentaho.di.core.exception.KettleStepException

  Get the fields that are emitted by this step

  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:
    `org.pentaho.di.core.exception.KettleStepException` - when an error occurred searching for the fields.

### getXML

    String getXML()
                  throws org.pentaho.di.core.exception.KettleException

  Get the XML that represents the values in this step

  Returns:
    the XML that represents the metadata in this step
  Throws:
    `org.pentaho.di.core.exception.KettleException` - in case there is a conversion or XML encoding error

### loadXML

    void loadXML(Node stepnode,
                 List<org.pentaho.di.core.database.DatabaseMeta> databases,
                 Map<String,org.pentaho.di.core.Counter> counters)
                 throws org.pentaho.di.core.exception.KettleXMLException

  Load the values for this step from an XML Node

  Parameters:
    `stepnode` - the Node to get the info from
    `databases` - The available list of databases to reference to
    `counters` - Counters to reference.
  Throws:
    `org.pentaho.di.core.exception.KettleXMLException` - When an unexpected XML error occurred. (malformed etc.)

### saveRep

    void saveRep(Repository rep,
                 long id_transformation,
                 long id_step)
                 throws org.pentaho.di.core.exception.KettleException

  Save the steps data into a Kettle repository

  Parameters:
    `rep` - The Kettle repository to save to
    `id_transformation` - The transformation ID
    `id_step` - The step ID
  Throws:
    `org.pentaho.di.core.exception.KettleException` - When an unexpected error occurred (database, network, etc)

### readRep

    void readRep(Repository rep,
                 long id_step,
                 List<org.pentaho.di.core.database.DatabaseMeta> databases,
                 Map<String,org.pentaho.di.core.Counter> counters)
                 throws org.pentaho.di.core.exception.KettleException

  Read the steps information from a Kettle repository

  Parameters:
    `rep` - The repository to read from
    `id_step` - The step ID
    `databases` - The databases to reference
    `counters` - The counters to reference
  Throws:
    `org.pentaho.di.core.exception.KettleException` - When an unexpected error occurred (database, network, etc)

### check

    void check(List<org.pentaho.di.core.CheckResultInterface> remarks,
               TransMeta transMeta,
               StepMeta stepMeta,
               org.pentaho.di.core.row.RowMetaInterface prev,
               String[] input,
               String[] output,
               org.pentaho.di.core.row.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

### clone

    Object clone()

  Make an exact copy of this step, make sure to explicitly copy Collections etc.

  Returns:
    an exact copy of this step

### getTableFields

    org.pentaho.di.core.row.RowMetaInterface getTableFields()

  Returns:
    The fields used by this step, this is being used for the Impact analyses.

### getInfoSteps

    String[] getInfoSteps()

  Returns:
    the informational source steps, if any. Null is the default: none.

### getTargetSteps

    String[] getTargetSteps()

  Returns:
    the chosen target steps, if any. Null is the default: automatically chosen target steps.

### setInfoSteps

    void setInfoSteps(StepMeta[] infoSteps)

  Parameters:
    `infoSteps` - The infostep(s) to set

### setTargetSteps

    void setTargetSteps(StepMeta[] targetSteps)

  Parameters:
    `targetSteps` - The target step(s) to set

### searchInfoAndTargetSteps

    void searchInfoAndTargetSteps(List<StepMeta> steps)

  Parameters:
    `steps` - optionally search the info step in a list of steps

### excludeFromRowLayoutVerification

    boolean excludeFromRowLayoutVerification()

  This method is added to exclude certain steps from layout checking.

  Since:
    2.5.0

### getDialogClassName

    String getDialogClassName()

  Get the name of the class that implements the dialog for this job entry JobEntryBase provides a default

### getStep

    StepInterface getStep(StepMeta stepMeta,
                          StepDataInterface stepDataInterface,
                          int copyNr,
                          TransMeta transMeta,
                          Trans trans)

  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.
    `copyNr` - The copy nr to get
    `transMeta` - The transformation info
    `trans` - The launching transformation

### getStepData

    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.

  Returns:
    The appropriate StepDataInterface class.

### analyseImpact

    void analyseImpact(List<DatabaseImpact> impact,
                       TransMeta transMeta,
                       StepMeta stepMeta,
                       org.pentaho.di.core.row.RowMetaInterface prev,
                       String[] input,
                       String[] output,
                       org.pentaho.di.core.row.RowMetaInterface info)
                       throws org.pentaho.di.core.exception.KettleStepException

  Each step must be able to report on the impact it has on a database, table field, etc.

  Parameters:
    `impact` - The list of impacts @see org.pentaho.di.transMeta.DatabaseImpact
    `transMeta` - The transformation information
    `stepMeta` - The step information
    `prev` - The fields entering this step
    `input` - The previous step names
    `output` - The output step names
    `info` - The fields used as information by this step
  Throws:
    `org.pentaho.di.core.exception.KettleStepException`

### getSQLStatements

    org.pentaho.di.core.SQLStatement getSQLStatements(TransMeta transMeta,
                                                      StepMeta stepMeta,
                                                      org.pentaho.di.core.row.RowMetaInterface prev)
                                                      throws org.pentaho.di.core.exception.KettleStepException

  Standard method to return an SQLStatement object with SQL statements that the step needs in order to work correctly. This can mean "create table", "create index" statements but also "alter table ... add/drop/modify" statements.

  Parameters:
    `transMeta` - TransInfo object containing the complete transformation
    `stepMeta` - StepMeta object containing the complete step
    `prev` - Row containing meta-data for the input fields (no data)
  Returns:
    The SQL Statements for this step. If nothing has to be done, the SQLStatement.getSQL() == null. @see SQLStatement
  Throws:
    `org.pentaho.di.core.exception.KettleStepException`

### cancelQueries

    void cancelQueries()
                       throws org.pentaho.di.core.exception.KettleDatabaseException

  Call this to cancel trailing database queries (too long running, etc)

  Throws:
    `org.pentaho.di.core.exception.KettleDatabaseException`

### getUsedArguments

    Map<String,String> getUsedArguments()

  Default a step doesn't use any arguments. Implement this to notify the GUI that a window has to be displayed BEFORE launching a transformation. You can also use this to specify certain Environment variable values.

  Returns:
    A Map of argument values. (name and optionally a default value) Put 10 values in the map for the possible 10 arguments.

### getRequiredFields

    org.pentaho.di.core.row.RowMetaInterface getRequiredFields()
                                                               throws org.pentaho.di.core.exception.KettleException

  Deprecated. please use the method with the variable space in it so we can do variable substitution.

  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.

  Returns:
    the required fields for this steps metadata.
  Throws:
    `org.pentaho.di.core.exception.KettleException` - in case the required fields can't be determined.

### getRequiredFields

    org.pentaho.di.core.row.RowMetaInterface getRequiredFields(org.pentaho.di.core.variables.VariableSpace space)
                                                               throws org.pentaho.di.core.exception.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.

  Parameters:
    `space` - the variable space to reference
  Returns:
    the required fields for this steps metadata.
  Throws:
    `org.pentaho.di.core.exception.KettleException` - in case the required fields can't be determined.

### getUsedDatabaseConnections

    org.pentaho.di.core.database.DatabaseMeta[] getUsedDatabaseConnections()

  This method returns all the database connections that are used by the step.

  Returns:
    an array of database connections meta-data. Return an empty array if no connections are used.

### getUsedLibraries

    String[] getUsedLibraries()

  Returns:
    the libraries that this step or plugin uses.

### supportsErrorHandling

    boolean supportsErrorHandling()

  Returns:
    true if this step supports error "reporting" on rows: the ability to send rows to a certain target step.

### getResourceDependencies

    List<ResourceReference> getResourceDependencies(TransMeta transMeta,
                                                    StepMeta stepMeta)

  Get a list of all the resource dependencies that the step is depending on.

  Parameters:
    `transMeta` -
    `stepMeta` -
  Returns:
    a list of all the resource dependencies that the step is depending on

### exportResources

    String exportResources(org.pentaho.di.core.variables.VariableSpace space,
                           Map<String,ResourceDefinition> definitions,
                           ResourceNamingInterface resourceNamingInterface,
                           Repository repository)
                           throws org.pentaho.di.core.exception.KettleException

  Parameters:
    `space` - the variable space to use
    `definitions` -
    `resourceNamingInterface` -
    `repository` - The repository to optionally load other resources from (to be converted to XML)
  Returns:
    the filename of the exported resource
  Throws:
    `org.pentaho.di.core.exception.KettleException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD