|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StepMetaInterface
This interface allows custom steps to talk to Kettle.
Method Summary | |
---|---|
void |
analyseImpact(List<DatabaseImpact> impact,
TransMeta transMeta,
StepMeta stepMeta,
RowMetaInterface prev,
String[] input,
String[] output,
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<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. |
boolean |
excludeFromCopyDistributeVerification()
This method is added to exclude certain steps from copy/distribute checking. |
boolean |
excludeFromRowLayoutVerification()
This method is added to exclude certain steps from layout checking. |
String |
exportResources(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(RowMetaInterface inputRowMeta,
String name,
RowMetaInterface[] info,
StepMeta nextStep,
VariableSpace space)
Get the fields that are emitted by this step |
List<StreamInterface> |
getOptionalStreams()
|
StepMeta |
getParentStepMeta()
|
RowMetaInterface |
getRequiredFields(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. |
SQLStatement |
getSQLStatements(TransMeta transMeta,
StepMeta stepMeta,
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. |
StepIOMetaInterface |
getStepIOMeta()
Returns the Input/Output metadata for this step. |
StepMetaInjectionInterface |
getStepMetaInjectionInterface()
|
TransMeta.TransformationType[] |
getSupportedTransformationTypes()
|
RowMetaInterface |
getTableFields()
|
Map<String,String> |
getUsedArguments()
Default a step doesn't use any arguments. |
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 |
handleStreamSelection(StreamInterface stream)
When an optional stream is selected, this method is called to handled the ETL metadata implications of that. |
boolean |
hasRepositoryReferences()
|
void |
loadXML(Node stepnode,
List<DatabaseMeta> databases,
Map<String,Counter> counters)
Load the values for this step from an XML Node |
void |
lookupRepositoryReferences(Repository repository)
Look up the references after import |
void |
readRep(Repository rep,
ObjectId id_step,
List<DatabaseMeta> databases,
Map<String,Counter> counters)
Read the steps information from a Kettle repository |
void |
resetStepIoMeta()
For steps that handle dynamic input (info) or output (target) streams, it is useful to be able to force the recreate the StepIoMeta definition. |
void |
saveRep(Repository rep,
ObjectId id_transformation,
ObjectId id_step)
Save the steps data into a Kettle repository |
void |
searchInfoAndTargetSteps(List<StepMeta> steps)
Change step names into step objects to allow them to be name-changed etc. |
void |
setDefault()
Set default values |
void |
setParentStepMeta(StepMeta parentStepMeta)
Provide original lineage for this metadata object |
boolean |
supportsErrorHandling()
|
Method Detail |
---|
void setDefault()
void getFields(RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space) throws KettleStepException
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 origininfo
- 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
KettleStepException
- when an error occurred searching for the fields.String getXML() throws KettleException
KettleException
- in case there is a conversion or XML encoding errorvoid loadXML(Node stepnode, List<DatabaseMeta> databases, Map<String,Counter> counters) throws KettleXMLException
stepnode
- the Node to get the info fromdatabases
- The available list of databases to reference tocounters
- Counters to reference.
KettleXMLException
- When an unexpected XML error occurred. (malformed etc.)void saveRep(Repository rep, ObjectId id_transformation, ObjectId id_step) throws KettleException
rep
- The Kettle repository to save toid_transformation
- The transformation IDid_step
- The step ID
KettleException
- When an unexpected error occurred (database, network, etc)void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String,Counter> counters) throws KettleException
rep
- The repository to read fromid_step
- The step IDdatabases
- The databases to referencecounters
- The counters to reference
KettleException
- When an unexpected error occurred (database, network, etc)void check(List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info)
remarks
- The list to put the remarks in @see org.pentaho.di.core.CheckResultstepMeta
- The stepMeta to help checkingprev
- The fields coming from the previous stepinput
- The input step namesoutput
- The output step namesinfo
- The fields that are used as information by the stepObject clone()
RowMetaInterface getTableFields()
boolean excludeFromRowLayoutVerification()
boolean excludeFromCopyDistributeVerification()
String getDialogClassName()
StepInterface getStep(StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta, Trans trans)
stepMeta
- The step infostepDataInterface
- the step data interface linked to this step. Here the step can store temporary data, database connections, etc.copyNr
- The copy nr to gettransMeta
- The transformation infotrans
- The launching transformationStepDataInterface getStepData()
void analyseImpact(List<DatabaseImpact> impact, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info) throws KettleStepException
impact
- The list of impacts @see org.pentaho.di.transMeta.DatabaseImpacttransMeta
- The transformation informationstepMeta
- The step informationprev
- The fields entering this stepinput
- The previous step namesoutput
- The output step namesinfo
- The fields used as information by this step
KettleStepException
SQLStatement getSQLStatements(TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev) throws KettleStepException
transMeta
- TransInfo object containing the complete transformationstepMeta
- StepMeta object containing the complete stepprev
- Row containing meta-data for the input fields (no data)
KettleStepException
void cancelQueries() throws KettleDatabaseException
KettleDatabaseException
Map<String,String> getUsedArguments()
RowMetaInterface getRequiredFields(VariableSpace space) throws KettleException
space
- the variable space to reference
KettleException
- in case the required fields can't be determined.DatabaseMeta[] getUsedDatabaseConnections()
String[] getUsedLibraries()
boolean supportsErrorHandling()
List<ResourceReference> getResourceDependencies(TransMeta transMeta, StepMeta stepMeta)
transMeta
- stepMeta
-
String exportResources(VariableSpace space, Map<String,ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException
space
- the variable space to usedefinitions
- resourceNamingInterface
- repository
- The repository to optionally load other resources from (to be converted to XML)
KettleException
StepMeta getParentStepMeta()
void setParentStepMeta(StepMeta parentStepMeta)
parentStepMeta
- the parent step metadata container objectStepIOMetaInterface getStepIOMeta()
List<StreamInterface> getOptionalStreams()
void handleStreamSelection(StreamInterface stream)
stream
- The optional stream to handle.void resetStepIoMeta()
void searchInfoAndTargetSteps(List<StepMeta> steps)
steps
- the steps to referenceStepMetaInjectionInterface getStepMetaInjectionInterface()
TransMeta.TransformationType[] getSupportedTransformationTypes()
boolean hasRepositoryReferences()
void lookupRepositoryReferences(Repository repository) throws KettleException
repository
- the repository to reference.
KettleException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |