public class BaseStepMeta extends Object implements Cloneable, StepAttributesInterface
For example, the "Text File Output" step's TextFileOutputMeta class extends BaseStepMeta by adding fields for the output file name, compression, file format, etc...
Modifier and Type | Field and Description |
---|---|
protected ArrayList<KettleAttributeInterface> |
attributes |
protected Database[] |
databases
database connection object to use for searching fields & checking steps
|
protected LogChannelInterface |
log |
static LoggingObjectInterface |
loggingObject |
protected StepMeta |
parentStepMeta |
protected Repository |
repository
The repository that is being used for this step
|
static String |
STEP_ATTRIBUTES_FILE |
Constructor and Description |
---|
BaseStepMeta()
Instantiates a new base step meta.
|
Modifier and Type | Method and Description |
---|---|
void |
analyseImpact(List<DatabaseImpact> impact,
TransMeta transMeta,
StepMeta stepMeta,
RowMetaInterface prev,
String[] input,
String[] output,
RowMetaInterface info)
|
void |
analyseImpact(List<DatabaseImpact> impact,
TransMeta transMeta,
StepMeta stepMeta,
RowMetaInterface prev,
String[] input,
String[] output,
RowMetaInterface info,
Repository repository,
org.pentaho.metastore.api.IMetaStore metaStore)
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)
|
void |
check(List<CheckResultInterface> remarks,
TransMeta transMeta,
StepMeta stepMeta,
RowMetaInterface prev,
String[] input,
String[] output,
RowMetaInterface info,
Repository repository,
org.pentaho.metastore.api.IMetaStore metaStore)
|
void |
check(List<CheckResultInterface> remarks,
TransMeta transMeta,
StepMeta stepMeta,
RowMetaInterface prev,
String[] input,
String[] output,
RowMetaInterface info,
VariableSpace space,
Repository repository,
org.pentaho.metastore.api.IMetaStore metaStore) |
Object |
clone() |
protected StepInjectionMetaEntry |
createEntry(KettleAttributeInterface attr,
Class<?> PKG)
Creates the entry.
|
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 |
exportResources(VariableSpace space,
Map<String,ResourceDefinition> definitions,
ResourceNamingInterface resourceNamingInterface,
Repository repository,
org.pentaho.metastore.api.IMetaStore metaStore) |
List<StepInjectionMetaEntry> |
extractStepMetadataEntries() |
KettleAttributeInterface |
findAttribute(String key) |
KettleAttributeInterface |
findParent(List<KettleAttributeInterface> attributes,
String parentId) |
protected StepInjectionMetaEntry |
findParentEntry(List<StepInjectionMetaEntry> entries,
String key)
Find parent entry.
|
String |
getActiveReferencedObjectDescription() |
String |
getDescription(String attributeKey) |
String |
getDialogClassName()
Deprecated.
As of release 8.1, use annotated-based dialog instead
PluginDialog |
void |
getFields(RowMetaInterface inputRowMeta,
String name,
RowMetaInterface[] info,
StepMeta nextStep,
VariableSpace space)
|
void |
getFields(RowMetaInterface inputRowMeta,
String name,
RowMetaInterface[] info,
StepMeta nextStep,
VariableSpace space,
Repository repository,
org.pentaho.metastore.api.IMetaStore metaStore)
Gets the fields.
|
LogChannelInterface |
getLog()
Gets the log.
|
String |
getLogChannelId()
Gets the log channel id.
|
String |
getName()
Gets the name.
|
String |
getObjectCopy()
Gets the object copy.
|
ObjectId |
getObjectId()
Gets the object id.
|
ObjectRevision |
getObjectRevision()
Gets the object revision.
|
LoggingObjectType |
getObjectType()
Gets the object type.
|
List<StreamInterface> |
getOptionalStreams() |
LoggingObjectInterface |
getParent()
Gets the parent.
|
StepMeta |
getParentStepMeta()
Gets the parent step meta.
|
String[] |
getReferencedObjectDescriptions() |
String |
getRepCode(String attributeKey) |
RepositoryDirectory |
getRepositoryDirectory()
Gets the repository directory.
|
RowMetaInterface |
getRequiredFields()
Deprecated.
|
RowMetaInterface |
getRequiredFields(VariableSpace space)
The natural way of data flow in a transformation is source-to-target.
|
List<ResourceReference> |
getResourceDependencies(TransMeta transMeta,
StepMeta stepInfo)
Get a list of all the resource dependencies that the step is depending on.
|
SQLStatement |
getSQLStatements(TransMeta transMeta,
StepMeta stepMeta,
RowMetaInterface prev)
|
SQLStatement |
getSQLStatements(TransMeta transMeta,
StepMeta stepMeta,
RowMetaInterface prev,
Repository repository,
org.pentaho.metastore.api.IMetaStore metaStore)
Standard method to return an SQLStatement object with SQL statements that the step needs in order to work
correctly.
|
List<StepInjectionMetaEntry> |
getStepInjectionMetadataEntries(Class<?> PKG)
Describe the metadata attributes that can be injected into this step metadata object.
|
StepIOMetaInterface |
getStepIOMeta() |
StepIOMetaInterface |
getStepIOMeta(boolean createIfAbsent)
Returns the Input/Output metadata for this step.
|
StepMetaInjectionInterface |
getStepMetaInjectionInterface() |
TransMeta.TransformationType[] |
getSupportedTransformationTypes() |
RowMetaInterface |
getTableFields()
Gets the table fields.
|
String |
getTooltip(String attributeKey) |
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()
Produces the XML string that describes this step's information.
|
String |
getXmlCode(String attributeKey) |
void |
handleStreamSelection(StreamInterface stream)
When an optional stream is selected, this method is called to handled the ETL metadata implications of that.
|
boolean |
hasChanged()
Checks for changed.
|
boolean |
hasRepositoryReferences() |
boolean |
isBasic()
Checks if is basic.
|
boolean |
isDebug()
Checks if is debug.
|
boolean |
isDetailed()
Checks if is detailed.
|
boolean[] |
isReferencedObjectEnabled() |
boolean |
isRowLevel()
Checks if is row level.
|
Object |
loadReferencedObject(int index,
Repository rep,
org.pentaho.metastore.api.IMetaStore metaStore,
VariableSpace space) |
Object |
loadReferencedObject(int index,
Repository rep,
VariableSpace space)
Deprecated.
|
protected void |
loadStepAttributes()
Load step attributes.
|
void |
loadXML(Node stepnode,
List<DatabaseMeta> databases)
Deprecated.
|
void |
loadXML(Node stepnode,
List<DatabaseMeta> databases,
org.pentaho.metastore.api.IMetaStore metaStore) |
void |
loadXML(Node stepnode,
List<DatabaseMeta> databases,
Map<String,Counter> counters)
Deprecated.
|
void |
logBasic(String message)
Log basic.
|
void |
logBasic(String message,
Object... arguments)
Log basic.
|
void |
logDebug(String message)
Log debug.
|
void |
logDebug(String message,
Object... arguments)
Log debug.
|
void |
logDetailed(String message)
Log detailed.
|
void |
logDetailed(String message,
Object... arguments)
Log detailed.
|
void |
logError(String message)
Log error.
|
void |
logError(String message,
Object... arguments)
Log error.
|
void |
logError(String message,
Throwable e)
Log error.
|
void |
logMinimal(String message)
Log minimal.
|
void |
logMinimal(String message,
Object... arguments)
Log minimal.
|
void |
logRowlevel(String message)
Log rowlevel.
|
void |
logRowlevel(String message,
Object... arguments)
Log rowlevel.
|
void |
lookupRepositoryReferences(Repository repository)
Look up the references after import
|
void |
readRep(Repository rep,
org.pentaho.metastore.api.IMetaStore metaStore,
ObjectId id_step,
List<DatabaseMeta> databases) |
void |
readRep(Repository rep,
ObjectId idStep,
List<DatabaseMeta> databases)
Deprecated.
|
void |
readRep(Repository rep,
ObjectId id_step,
List<DatabaseMeta> databases,
Map<String,Counter> counters)
Deprecated.
|
void |
resetStepIoMeta()
Reset step io meta.
|
void |
saveRep(Repository rep,
org.pentaho.metastore.api.IMetaStore metaStore,
ObjectId id_transformation,
ObjectId id_step) |
void |
saveRep(Repository rep,
ObjectId id_transformation,
ObjectId id_step)
Deprecated.
use {@link #saveRep(Repository, IMetaStore, ObjectId, ObjectId)
|
void |
searchInfoAndTargetSteps(List<StepMeta> steps)
Change step names into step objects to allow them to be name-changed etc.
|
void |
setChanged()
Sets the changed.
|
void |
setChanged(boolean ch)
Sets the changed.
|
void |
setParentStepMeta(StepMeta parentStepMeta)
Sets the parent step meta.
|
void |
setStepIOMeta(StepIOMetaInterface value)
Sets the Input/Output metadata for this step.
|
boolean |
supportsErrorHandling() |
public static final LoggingObjectInterface loggingObject
public static final String STEP_ATTRIBUTES_FILE
protected Database[] databases
protected Repository repository
protected StepMeta parentStepMeta
protected LogChannelInterface log
protected ArrayList<KettleAttributeInterface> attributes
public void setChanged(boolean ch)
ch
- the new changedpublic void setChanged()
public boolean hasChanged()
public RowMetaInterface getTableFields()
public String getXML() throws KettleException
KettleException
- in case there is an XML conversion or encoding error@Deprecated public void getFields(RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space) throws KettleStepException
getFields(RowMetaInterface, String, RowMetaInterface[], StepMeta, VariableSpace, Repository, IMetaStore)
inputRowMeta
- the input row meta that is modified in this method to reflect the output row metadata of the stepname
- Name of the step to use as input for the origin field in the valuesinfo
- Fields used as extra lookup informationnextStep
- the next step that is targetedspace
- the space The variable space to use to replace variablesKettleStepException
- the kettle step exceptionpublic void getFields(RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore) throws KettleStepException
inputRowMeta
- the input row meta that is modified in this method to reflect the output row metadata of the stepname
- Name of the step to use as input for the origin field in the valuesinfo
- Fields used as extra lookup informationnextStep
- the next step that is targetedspace
- the space The variable space to use to replace variablesrepository
- the repository to use to load Kettle metadata objects impacting the output fieldsmetaStore
- the MetaStore to use to load additional external data or metadata impacting the output fieldsKettleStepException
- the kettle step exception@Deprecated public void analyseImpact(List<DatabaseImpact> impact, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info) throws KettleStepException
analyseImpact(List, TransMeta, StepMeta, RowMetaInterface, String[], String[], RowMetaInterface, Repository, IMetaStore)
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 stepKettleStepException
public void analyseImpact(List<DatabaseImpact> impact, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore) 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 steprepository
- the repository to use to load Kettle metadata objects impacting the output fieldsmetaStore
- the MetaStore to use to load additional external data or metadata impacting the output fieldsKettleStepException
@Deprecated public 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
public SQLStatement getSQLStatements(TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore) 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)repository
- the repository to use to load Kettle metadata objects impacting the output fieldsmetaStore
- the MetaStore to use to load additional external data or metadata impacting the output fieldsKettleStepException
public void cancelQueries() throws KettleDatabaseException
KettleDatabaseException
public Map<String,String> getUsedArguments()
@Deprecated public RowMetaInterface getRequiredFields() throws KettleException
getRequiredFields(VariableSpace)
KettleException
- in case the required fields can't be determinedpublic RowMetaInterface getRequiredFields(VariableSpace space) throws KettleException
space
- the variable space to use to do variable substitution.KettleException
- in case the required fields can't be determinedpublic DatabaseMeta[] getUsedDatabaseConnections()
public String[] getUsedLibraries()
public boolean supportsErrorHandling()
public boolean excludeFromRowLayoutVerification()
public boolean excludeFromCopyDistributeVerification()
public List<ResourceReference> getResourceDependencies(TransMeta transMeta, StepMeta stepInfo)
@Deprecated public String exportResources(VariableSpace space, Map<String,ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException
exportResources(VariableSpace, Map, ResourceNamingInterface, Repository, IMetaStore)
space
- the spacedefinitions
- the definitionsresourceNamingInterface
- the resource naming interfacerepository
- the repositoryKettleException
- the kettle exceptionpublic String exportResources(VariableSpace space, Map<String,ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore) throws KettleException
KettleException
@Deprecated public String getDialogClassName()
PluginDialog
public StepMeta getParentStepMeta()
public void setParentStepMeta(StepMeta parentStepMeta)
parentStepMeta
- the new parent step metapublic LogChannelInterface getLog()
public boolean isBasic()
public boolean isDetailed()
public boolean isDebug()
public boolean isRowLevel()
public void logMinimal(String message)
message
- the messagepublic void logMinimal(String message, Object... arguments)
message
- the messagearguments
- the argumentspublic void logBasic(String message)
message
- the messagepublic void logBasic(String message, Object... arguments)
message
- the messagearguments
- the argumentspublic void logDetailed(String message)
message
- the messagepublic void logDetailed(String message, Object... arguments)
message
- the messagearguments
- the argumentspublic void logDebug(String message)
message
- the messagepublic void logDebug(String message, Object... arguments)
message
- the messagearguments
- the argumentspublic void logRowlevel(String message)
message
- the messagepublic void logRowlevel(String message, Object... arguments)
message
- the messagearguments
- the argumentspublic void logError(String message)
message
- the messagepublic void logError(String message, Throwable e)
message
- the messagee
- the epublic void logError(String message, Object... arguments)
message
- the messagearguments
- the argumentspublic String getLogChannelId()
public String getName()
public String getObjectCopy()
public ObjectId getObjectId()
public ObjectRevision getObjectRevision()
public LoggingObjectType getObjectType()
public LoggingObjectInterface getParent()
public RepositoryDirectory getRepositoryDirectory()
public StepIOMetaInterface getStepIOMeta()
public StepIOMetaInterface getStepIOMeta(boolean createIfAbsent)
public void setStepIOMeta(StepIOMetaInterface value)
value
- the StepIOMetaInterface to set for this step.public List<StreamInterface> getOptionalStreams()
public void handleStreamSelection(StreamInterface stream)
stream
- The optional stream to handle.public void resetStepIoMeta()
public void searchInfoAndTargetSteps(List<StepMeta> steps)
steps
- the steps to referencepublic StepMetaInjectionInterface getStepMetaInjectionInterface()
public List<StepInjectionMetaEntry> extractStepMetadataEntries() throws KettleException
KettleException
protected StepInjectionMetaEntry findParentEntry(List<StepInjectionMetaEntry> entries, String key)
entries
- the entrieskey
- the keyprotected StepInjectionMetaEntry createEntry(KettleAttributeInterface attr, Class<?> PKG)
attr
- the attrPKG
- the pkgpublic List<StepInjectionMetaEntry> getStepInjectionMetadataEntries(Class<?> PKG)
protected void loadStepAttributes() throws KettleException
KettleException
- the kettle exceptionpublic KettleAttributeInterface findParent(List<KettleAttributeInterface> attributes, String parentId)
findParent
in interface StepAttributesInterface
public KettleAttributeInterface findAttribute(String key)
findAttribute
in interface StepAttributesInterface
public String getXmlCode(String attributeKey)
getXmlCode
in interface StepAttributesInterface
public String getRepCode(String attributeKey)
getRepCode
in interface StepAttributesInterface
public String getDescription(String attributeKey)
getDescription
in interface StepAttributesInterface
public String getTooltip(String attributeKey)
getTooltip
in interface StepAttributesInterface
public TransMeta.TransformationType[] getSupportedTransformationTypes()
public boolean hasRepositoryReferences()
public void lookupRepositoryReferences(Repository repository) throws KettleException
repository
- the repository to reference.KettleException
public String[] getReferencedObjectDescriptions()
public boolean[] isReferencedObjectEnabled()
public String getActiveReferencedObjectDescription()
@Deprecated public Object loadReferencedObject(int index, Repository rep, VariableSpace space) throws KettleException
loadReferencedObject(int, Repository, IMetaStore, VariableSpace)
index
- the object index to loadrep
- the repositoryspace
- the variable space to useKettleException
public Object loadReferencedObject(int index, Repository rep, org.pentaho.metastore.api.IMetaStore metaStore, VariableSpace space) throws KettleException
KettleException
@Deprecated public void readRep(Repository rep, ObjectId idStep, List<DatabaseMeta> databases) throws KettleException
KettleException
public void readRep(Repository rep, org.pentaho.metastore.api.IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases) throws KettleException
KettleException
@Deprecated public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String,Counter> counters) throws KettleException
KettleException
@Deprecated public void loadXML(Node stepnode, List<DatabaseMeta> databases) throws KettleXMLException
loadXML(Node, List, IMetaStore)
stepnode
- databases
- KettleXMLException
@Deprecated public void loadXML(Node stepnode, List<DatabaseMeta> databases, Map<String,Counter> counters) throws KettleXMLException
loadXML(Node, List, IMetaStore)
stepnode
- databases
- KettleXMLException
public void loadXML(Node stepnode, List<DatabaseMeta> databases, org.pentaho.metastore.api.IMetaStore metaStore) throws KettleXMLException
KettleXMLException
@Deprecated public void saveRep(Repository rep, ObjectId id_transformation, ObjectId id_step) throws KettleException
stepnode
- databases
- KettleXMLException
KettleException
public void saveRep(Repository rep, org.pentaho.metastore.api.IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step) throws KettleException
KettleException
@Deprecated public void check(List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info)
check(List, TransMeta, StepMeta, RowMetaInterface, String[], String[], RowMetaInterface, VariableSpace, Repository, IMetaStore)
remarks
- transMeta
- stepMeta
- prev
- input
- output
- info
- @Deprecated public void check(List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore)
check(List, TransMeta, StepMeta, RowMetaInterface, String[], String[], RowMetaInterface, VariableSpace, Repository, IMetaStore)
remarks
- transMeta
- stepMeta
- prev
- input
- output
- info
- repository
- metaStore
- public void check(List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore)
Copyright © 2018 Hitachi Vantara. All rights reserved.