Class TransMeta

java.lang.Object
org.pentaho.di.base.AbstractMeta
org.pentaho.di.trans.TransMeta
All Implemented Interfaces:
Cloneable, Comparable<TransMeta>, Comparator<TransMeta>, org.pentaho.di.core.AttributesInterface, org.pentaho.di.core.bowl.HasBowlInterface, ChangedFlagInterface, EngineMetaInterface, UndoInterface, org.pentaho.di.core.logging.LoggingObjectInterface, org.pentaho.di.core.logging.LoggingObjectLifecycleInterface, org.pentaho.di.core.parameters.NamedParams, org.pentaho.di.core.variables.VariableSpace, org.pentaho.di.core.xml.XMLInterface, HasRepositoryInterface, org.pentaho.di.repository.RepositoryElementInterface, org.pentaho.di.repository.RepositoryObjectInterface, ResourceExportInterface, HasDatabasesInterface, HasSlaveServersInterface

public class TransMeta extends AbstractMeta implements org.pentaho.di.core.xml.XMLInterface, Comparator<TransMeta>, Comparable<TransMeta>, Cloneable, ResourceExportInterface, org.pentaho.di.repository.RepositoryElementInterface, org.pentaho.di.core.logging.LoggingObjectInterface
This class defines information about a transformation and offers methods to save and load it from XML or a PDI database repository, as well as methods to alter a transformation by adding/removing databases, steps, hops, etc.
Since:
20-jun-2003
Author:
Matt Casters
  • Field Details

    • XML_TAG

      public static final String XML_TAG
      A constant specifying the tag value for the XML node of the transformation.
      See Also:
    • STRING_TRANSMETA

      public static final String STRING_TRANSMETA
      A constant used by the logging operations to indicate any logged messages are related to transformation meta-data.
      See Also:
    • REPOSITORY_ELEMENT_TYPE

      public static final org.pentaho.di.repository.RepositoryObjectType REPOSITORY_ELEMENT_TYPE
      A constant specifying the repository element type as a Transformation.
    • BORDER_INDENT

      public static final int BORDER_INDENT
      See Also:
    • steps

      protected List<StepMeta> steps
      The list of steps associated with the transformation.
    • hops

      protected List<TransHopMeta> hops
      The list of hops associated with the transformation.
    • dependencies

      protected List<TransDependency> dependencies
      The list of dependencies associated with the transformation.
    • clusterSchemas

      protected List<ClusterSchema> clusterSchemas
      The list of cluster schemas associated with the transformation.
    • trans_version

      protected String trans_version
      The version string for the transformation.
    • trans_status

      protected int trans_status
      The status of the transformation.
    • transLogTable

      protected TransLogTable transLogTable
      The transformation logging table associated with the transformation.
    • performanceLogTable

      protected PerformanceLogTable performanceLogTable
      The performance logging table associated with the transformation.
    • stepLogTable

      protected StepLogTable stepLogTable
      The step logging table associated with the transformation.
    • metricsLogTable

      protected MetricsLogTable metricsLogTable
      The metricslogging table associated with the transformation.
    • sizeRowset

      protected int sizeRowset
      The size of the current rowset.
    • maxDateConnection

      protected org.pentaho.di.core.database.DatabaseMeta maxDateConnection
      The meta-data for the database connection associated with "max date" auditing information.
    • maxDateTable

      protected String maxDateTable
      The table name associated with "max date" auditing information.
    • maxDateField

      protected String maxDateField
      The field associated with "max date" auditing information.
    • maxDateOffset

      protected double maxDateOffset
      The amount by which to increase the "max date" value.
    • maxDateDifference

      protected double maxDateDifference
      The maximum date difference used for "max date" auditing and limiting job sizes.
    • arguments

      @Deprecated protected String[] arguments
      Deprecated.
      Moved to Trans
      The list of arguments to the transformation.
    • counters

      @Deprecated protected Hashtable<String,org.pentaho.di.core.Counter> counters
      Deprecated.
      Moved to Trans
      A table of named counters.
    • changed_steps

      protected boolean changed_steps
      Indicators for changes in steps, databases, hops, and notes.
    • changed_hops

      protected boolean changed_hops
      Indicators for changes in steps, databases, hops, and notes.
    • dbCache

      protected org.pentaho.di.core.DBCache dbCache
      The database cache.
    • sleepTimeEmpty

      protected int sleepTimeEmpty
      The time (in nanoseconds) to wait when the input buffer is empty.
    • sleepTimeFull

      protected int sleepTimeFull
      The time (in nanoseconds) to wait when the input buffer is full.
    • previousResult

      protected org.pentaho.di.core.Result previousResult
      The previous result.
    • resultRows

      @Deprecated protected List<org.pentaho.di.core.RowMetaAndData> resultRows
      Deprecated.
      The result rows.
    • resultFiles

      @Deprecated protected List<org.pentaho.di.core.ResultFile> resultFiles
      Deprecated.
      The result files.
    • usingUniqueConnections

      protected boolean usingUniqueConnections
      Whether the transformation is using unique connections.
    • feedbackShown

      protected boolean feedbackShown
      Whether the feedback is shown.
    • feedbackSize

      protected int feedbackSize
      The feedback size.
    • usingThreadPriorityManagment

      protected boolean usingThreadPriorityManagment
      Flag to indicate thread management usage. Set to default to false from version 2.5.0 on. Before that it was enabled by default.
    • slaveStepCopyPartitionDistribution

      protected SlaveStepCopyPartitionDistribution slaveStepCopyPartitionDistribution
      The slave-step-copy/partition distribution. Only used for slave transformations in a clustering environment.
    • slaveTransformation

      protected boolean slaveTransformation
      Just a flag indicating that this is a slave transformation - internal use only, no GUI option.
    • capturingStepPerformanceSnapShots

      protected boolean capturingStepPerformanceSnapShots
      Whether the transformation is capturing step performance snap shots.
    • stepPerformanceCapturingDelay

      protected long stepPerformanceCapturingDelay
      The step performance capturing delay.
    • stepPerformanceCapturingSizeLimit

      protected String stepPerformanceCapturingSizeLimit
      The step performance capturing size limit.
    • stepsFieldsCache

      protected Map<String,org.pentaho.di.core.row.RowMetaInterface> stepsFieldsCache
      The steps fields cache.
    • loopCache

      protected Map<String,Boolean> loopCache
      The loop cache.
    • previousStepCache

      protected Map<String,List<StepMeta>> previousStepCache
      The previous step cache
    • log

      protected org.pentaho.di.core.logging.LogChannelInterface log
      The log channel interface.
    • stepChangeListeners

      protected List<StepMetaChangeListenerInterface> stepChangeListeners
      The list of StepChangeListeners
    • keyForSessionKey

      protected byte[] keyForSessionKey
    • transformationType

      protected TransMeta.TransformationType transformationType
      The transformation type.
    • desc_type_undo

      public static final String[] desc_type_undo
      A list of localized strings corresponding to string descriptions of the undo/redo actions.
    • XML_TAG_INFO

      protected static final String XML_TAG_INFO
      A constant specifying the tag value for the XML node of the transformation information.
      See Also:
    • XML_TAG_ORDER

      public static final String XML_TAG_ORDER
      A constant specifying the tag value for the XML node of the order of steps.
      See Also:
    • XML_TAG_NOTEPADS

      public static final String XML_TAG_NOTEPADS
      A constant specifying the tag value for the XML node of the notes.
      See Also:
    • XML_TAG_PARAMETERS

      public static final String XML_TAG_PARAMETERS
      A constant specifying the tag value for the XML node of the transformation parameters.
      See Also:
    • XML_TAG_DEPENDENCIES

      protected static final String XML_TAG_DEPENDENCIES
      A constant specifying the tag value for the XML node of the transformation dependencies.
      See Also:
    • XML_TAG_PARTITIONSCHEMAS

      public static final String XML_TAG_PARTITIONSCHEMAS
      A constant specifying the tag value for the XML node of the transformation's partition schemas.
      See Also:
    • XML_TAG_SLAVESERVERS

      public static final String XML_TAG_SLAVESERVERS
      A constant specifying the tag value for the XML node of the slave servers.
      See Also:
    • XML_TAG_CLUSTERSCHEMAS

      public static final String XML_TAG_CLUSTERSCHEMAS
      A constant specifying the tag value for the XML node of the cluster schemas.
      See Also:
    • XML_TAG_STEP_ERROR_HANDLING

      public static final String XML_TAG_STEP_ERROR_HANDLING
      A constant specifying the tag value for the XML node of the steps' error-handling information.
      See Also:
  • Constructor Details

    • TransMeta

      public TransMeta()
      Builds a new empty transformation. The transformation will have default logging capability and no variables, and all internal meta-data is cleared to defaults.
    • TransMeta

      public TransMeta(org.pentaho.di.core.variables.VariableSpace parent)
      Builds a new empty transformation with a set of variables to inherit from.
      Parameters:
      parent - the variable space to inherit from
    • TransMeta

      public TransMeta(String filename, String name)
    • TransMeta

      @Deprecated public TransMeta(String filename, String name, String[] arguments)
      Deprecated.
      passing in arguments (a runtime argument) into the metadata is deprecated, pass it to Trans
      Constructs a new transformation specifying the filename, name and arguments.
      Parameters:
      filename - The filename of the transformation
      name - The name of the transformation
      arguments - The arguments as Strings
    • TransMeta

      public TransMeta(String fname) throws org.pentaho.di.core.exception.KettleXMLException, org.pentaho.di.core.exception.KettleMissingPluginsException
      Parses a file containing the XML that describes the transformation. No default connections are loaded since no repository is available at this time. Since the filename is set, internal variables are being set that relate to this.
      Parameters:
      fname - The filename
      Throws:
      org.pentaho.di.core.exception.KettleXMLException - if any errors occur during parsing of the specified file
      org.pentaho.di.core.exception.KettleMissingPluginsException - in case missing plugins were found (details are in the exception in that case)
    • TransMeta

      public TransMeta(String fname, org.pentaho.di.core.variables.VariableSpace parentVariableSpace) throws org.pentaho.di.core.exception.KettleXMLException, org.pentaho.di.core.exception.KettleMissingPluginsException
      Parses a file containing the XML that describes the transformation. No default connections are loaded since no repository is available at this time. Since the filename is set, variables are set in the specified variable space that relate to this.
      Parameters:
      fname - The filename
      parentVariableSpace - the parent variable space
      Throws:
      org.pentaho.di.core.exception.KettleXMLException - if any errors occur during parsing of the specified file
      org.pentaho.di.core.exception.KettleMissingPluginsException - in case missing plugins were found (details are in the exception in that case)
    • TransMeta

      public TransMeta(String fname, boolean setInternalVariables) throws org.pentaho.di.core.exception.KettleXMLException, org.pentaho.di.core.exception.KettleMissingPluginsException
      Parses a file containing the XML that describes the transformation. No default connections are loaded since no repository is available at this time.
      Parameters:
      fname - The filename
      setInternalVariables - true if you want to set the internal variables based on this transformation information
      Throws:
      org.pentaho.di.core.exception.KettleXMLException - if any errors occur during parsing of the specified file
      org.pentaho.di.core.exception.KettleMissingPluginsException - in case missing plugins were found (details are in the exception in that case)
    • TransMeta

      public TransMeta(String fname, Repository rep) throws org.pentaho.di.core.exception.KettleXMLException, org.pentaho.di.core.exception.KettleMissingPluginsException
      Parses a file containing the XML that describes the transformation.
      Parameters:
      fname - The filename
      rep - The repository to load the default set of connections from, null if no repository is available
      Throws:
      org.pentaho.di.core.exception.KettleXMLException - if any errors occur during parsing of the specified file
      org.pentaho.di.core.exception.KettleMissingPluginsException - in case missing plugins were found (details are in the exception in that case)
    • TransMeta

      public TransMeta(String fname, Repository rep, boolean setInternalVariables) throws org.pentaho.di.core.exception.KettleXMLException, org.pentaho.di.core.exception.KettleMissingPluginsException
      Parses a file containing the XML that describes the transformation.
      Parameters:
      fname - The filename
      rep - The repository to load the default set of connections from, null if no repository is available
      setInternalVariables - true if you want to set the internal variables based on this transformation information
      Throws:
      org.pentaho.di.core.exception.KettleXMLException - if any errors occur during parsing of the specified file
      org.pentaho.di.core.exception.KettleMissingPluginsException - in case missing plugins were found (details are in the exception in that case)
    • TransMeta

      public TransMeta(String fname, Repository rep, boolean setInternalVariables, org.pentaho.di.core.variables.VariableSpace parentVariableSpace) throws org.pentaho.di.core.exception.KettleXMLException, org.pentaho.di.core.exception.KettleMissingPluginsException
      Parses a file containing the XML that describes the transformation.
      Parameters:
      fname - The filename
      rep - The repository to load the default set of connections from, null if no repository is available
      setInternalVariables - true if you want to set the internal variables based on this transformation information
      parentVariableSpace - the parent variable space to use during TransMeta construction
      Throws:
      org.pentaho.di.core.exception.KettleXMLException - if any errors occur during parsing of the specified file
      org.pentaho.di.core.exception.KettleMissingPluginsException - in case missing plugins were found (details are in the exception in that case)
    • TransMeta

      public TransMeta(String fname, Repository rep, boolean setInternalVariables, org.pentaho.di.core.variables.VariableSpace parentVariableSpace, org.pentaho.di.core.gui.OverwritePrompter prompter) throws org.pentaho.di.core.exception.KettleXMLException, org.pentaho.di.core.exception.KettleMissingPluginsException
      Parses a file containing the XML that describes the transformation.
      Parameters:
      fname - The filename
      rep - The repository to load the default set of connections from, null if no repository is available
      setInternalVariables - true if you want to set the internal variables based on this transformation information
      parentVariableSpace - the parent variable space to use during TransMeta construction
      prompter - the changed/replace listener or null if there is none
      Throws:
      org.pentaho.di.core.exception.KettleXMLException - if any errors occur during parsing of the specified file
      org.pentaho.di.core.exception.KettleMissingPluginsException - in case missing plugins were found (details are in the exception in that case)
    • TransMeta

      public TransMeta(String fname, org.pentaho.metastore.api.IMetaStore metaStore, Repository rep, boolean setInternalVariables, org.pentaho.di.core.variables.VariableSpace parentVariableSpace, org.pentaho.di.core.gui.OverwritePrompter prompter) throws org.pentaho.di.core.exception.KettleXMLException, org.pentaho.di.core.exception.KettleMissingPluginsException
      Parses a file containing the XML that describes the transformation.
      Parameters:
      fname - The filename
      metaStore - the metadata store to reference (or null if there is none)
      rep - The repository to load the default set of connections from, null if no repository is available
      setInternalVariables - true if you want to set the internal variables based on this transformation information
      parentVariableSpace - the parent variable space to use during TransMeta construction
      prompter - the changed/replace listener or null if there is none
      Throws:
      org.pentaho.di.core.exception.KettleXMLException - if any errors occur during parsing of the specified file
      org.pentaho.di.core.exception.KettleMissingPluginsException - in case missing plugins were found (details are in the exception in that case)
    • TransMeta

      public TransMeta(InputStream xmlStream, Repository rep, boolean setInternalVariables, org.pentaho.di.core.variables.VariableSpace parentVariableSpace, org.pentaho.di.core.gui.OverwritePrompter prompter) throws org.pentaho.di.core.exception.KettleXMLException, org.pentaho.di.core.exception.KettleMissingPluginsException
      Instantiates a new transformation meta-data object.
      Parameters:
      xmlStream - the XML input stream from which to read the transformation definition
      rep - the repository
      setInternalVariables - whether to set internal variables as a result of the creation
      parentVariableSpace - the parent variable space
      prompter - a GUI component that will prompt the user if the new transformation will overwrite an existing one
      Throws:
      org.pentaho.di.core.exception.KettleXMLException - if any errors occur during parsing of the specified stream
      org.pentaho.di.core.exception.KettleMissingPluginsException - in case missing plugins were found (details are in the exception in that case)
    • TransMeta

      public TransMeta(Node transnode, Repository rep) throws org.pentaho.di.core.exception.KettleXMLException, org.pentaho.di.core.exception.KettleMissingPluginsException
      Parse a file containing the XML that describes the transformation. Specify a repository to load default list of database connections from and to reference in mappings etc.
      Parameters:
      transnode - The XML node to load from
      rep - the repository to reference.
      Throws:
      org.pentaho.di.core.exception.KettleXMLException - if any errors occur during parsing of the specified file
      org.pentaho.di.core.exception.KettleMissingPluginsException - in case missing plugins were found (details are in the exception in that case)
  • Method Details

    • compare

      public int compare(TransMeta t1, TransMeta t2)
      Compares two transformation on name, filename, repository directory, etc. The comparison algorithm is as follows:
      1. The first transformation's filename is checked first; if it has none, the transformation comes from a repository. If the second transformation does not come from a repository, -1 is returned.
      2. If the transformations are both from a repository, the transformations' names are compared. If the first transformation has no name and the second one does, a -1 is returned. If the opposite is true, a 1 is returned.
      3. If they both have names they are compared as strings. If the result is non-zero it is returned. Otherwise the repository directories are compared using the same technique of checking empty values and then performing a string comparison, returning any non-zero result.
      4. If the names and directories are equal, the object revision strings are compared using the same technique of checking empty values and then performing a string comparison, this time ultimately returning the result of the string compare.
      5. If the first transformation does not come from a repository and the second one does, a 1 is returned. Otherwise the transformation names and filenames are subsequently compared using the same technique of checking empty values and then performing a string comparison, ultimately returning the result of the filename string comparison.
      Specified by:
      compare in interface Comparator<TransMeta>
      Parameters:
      t1 - the first transformation to compare
      t2 - the second transformation to compare
      Returns:
      0 if the two transformations are equal, 1 or -1 depending on the values (see description above)
    • compareTo

      public int compareTo(TransMeta o)
      Compares this transformation's meta-data to the specified transformation's meta-data. This method simply calls compare(this, o)
      Specified by:
      compareTo in interface Comparable<TransMeta>
      Parameters:
      o - the o
      Returns:
      the int
      See Also:
    • equals

      public boolean equals(Object obj)
      Checks whether this transformation's meta-data object is equal to the specified object. If the specified object is not an instance of TransMeta, false is returned. Otherwise the method returns whether a call to compare() indicates equality (i.e. compare(this, (TransMeta)obj)==0).
      Specified by:
      equals in interface Comparator<TransMeta>
      Overrides:
      equals in class Object
      Parameters:
      obj - the obj
      Returns:
      true, if successful
      See Also:
    • clone

      public Object clone()
      Clones the transformation meta-data object.
      Overrides:
      clone in class Object
      Returns:
      a clone of the transformation meta-data object
      See Also:
    • realClone

      public Object realClone(boolean doClear)
      Perform a real clone of the transformation meta-data object, including cloning all lists and copying all values. If the doClear parameter is true, the clone will be cleared of ALL values before the copy. If false, only the copied fields will be cleared.
      Parameters:
      doClear - Whether to clear all of the clone's data before copying from the source object
      Returns:
      a real clone of the calling object
    • clear

      public void clear()
      Clears the transformation's meta-data, including the lists of databases, steps, hops, notes, dependencies, partition schemas, slave servers, and cluster schemas. Logging information and timeouts are reset to defaults, and recent connection info is cleared.
      Overrides:
      clear in class AbstractMeta
    • addStep

      public void addStep(StepMeta stepMeta)
      Add a new step to the transformation. Also marks that the transformation's steps have changed.
      Parameters:
      stepMeta - The meta-data for the step to be added.
    • addOrReplaceStep

      public void addOrReplaceStep(StepMeta stepMeta)
      Add a new step to the transformation if that step didn't exist yet. Otherwise, replace the step. This method also marks that the transformation's steps have changed.
      Parameters:
      stepMeta - The meta-data for the step to be added.
    • addTransHop

      public void addTransHop(TransHopMeta hi)
      Add a new hop to the transformation. The hop information (source and target steps, e.g.) should be configured in the TransHopMeta object before calling addTransHop(). Also marks that the transformation's hops have changed.
      Parameters:
      hi - The hop meta-data to be added.
    • addDependency

      public void addDependency(TransDependency td)
      Add a new dependency to the transformation.
      Parameters:
      td - The transformation dependency to be added.
    • addStep

      public void addStep(int p, StepMeta stepMeta)
      Add a new step to the transformation at the specified index. This method sets the step's parent transformation to the this transformation, and marks that the transformations' steps have changed.
      Parameters:
      p - The index into the step list
      stepMeta - The step to be added.
    • addTransHop

      public void addTransHop(int p, TransHopMeta hi)
      Add a new hop to the transformation on a certain location (i.e. the specified index). Also marks that the transformation's hops have changed.
      Parameters:
      p - the index into the hop list
      hi - The hop to be added.
    • addDependency

      public void addDependency(int p, TransDependency td)
      Add a new dependency to the transformation on a certain location (i.e. the specified index).
      Parameters:
      p - The index into the dependencies list.
      td - The transformation dependency to be added.
    • getSteps

      public List<StepMeta> getSteps()
      Get a list of defined steps in this transformation.
      Returns:
      an ArrayList of defined steps.
    • getStep

      public StepMeta getStep(int i)
      Retrieves a step on a certain location (i.e. the specified index).
      Parameters:
      i - The index into the steps list.
      Returns:
      The desired step's meta-data.
    • getTransHops

      public List<TransHopMeta> getTransHops()
      Get a list of defined hops in this transformation.
      Returns:
      a list of defined hops.
    • getTransHop

      public TransHopMeta getTransHop(int i)
      Retrieves a hop on a certain location (i.e. the specified index).
      Parameters:
      i - The index into the hops list.
      Returns:
      The desired hop's meta-data.
    • getDependency

      public TransDependency getDependency(int i)
      Retrieves a dependency on a certain location (i.e. the specified index).
      Parameters:
      i - The index into the dependencies list.
      Returns:
      The dependency object.
    • removeStep

      public void removeStep(int i)
      Removes a step from the transformation on a certain location (i.e. the specified index). Also marks that the transformation's steps have changed.
      Parameters:
      i - The index
    • removeTransHop

      public void removeTransHop(int i)
      Removes a hop from the transformation on a certain location (i.e. the specified index). Also marks that the transformation's hops have changed.
      Parameters:
      i - The index into the hops list
    • removeTransHop

      public void removeTransHop(TransHopMeta hop)
      Removes a hop from the transformation. Also marks that the transformation's hops have changed.
      Parameters:
      hop - The hop to remove from the list of hops
    • removeDependency

      public void removeDependency(int i)
      Removes a dependency from the transformation on a certain location (i.e. the specified index).
      Parameters:
      i - The location
    • removeAllDependencies

      public void removeAllDependencies()
      Clears all the dependencies from the transformation.
    • nrSteps

      public int nrSteps()
      Gets the number of steps in the transformation.
      Returns:
      The number of steps in the transformation.
    • nrTransHops

      public int nrTransHops()
      Gets the number of hops in the transformation.
      Returns:
      The number of hops in the transformation.
    • nrDependencies

      public int nrDependencies()
      Gets the number of dependencies in the transformation.
      Returns:
      The number of dependencies in the transformation.
    • nrStepChangeListeners

      public int nrStepChangeListeners()
      Gets the number of stepChangeListeners in the transformation.
      Returns:
      The number of stepChangeListeners in the transformation.
    • setStep

      public void setStep(int i, StepMeta stepMeta)
      Changes the content of a step on a certain position. This is accomplished by setting the step's metadata at the specified index to the specified meta-data object. The new step's parent transformation is updated to be this transformation.
      Parameters:
      i - The index into the steps list
      stepMeta - The step meta-data to set
    • setTransHop

      public void setTransHop(int i, TransHopMeta hi)
      Changes the content of a hop on a certain position. This is accomplished by setting the hop's metadata at the specified index to the specified meta-data object.
      Parameters:
      i - The index into the hops list
      hi - The hop meta-data to set
    • getUsedSteps

      public List<StepMeta> getUsedSteps()
      Gets the list of used steps, which are the steps that are connected by hops.
      Returns:
      a list with all the used steps
    • findStep

      public StepMeta findStep(String name)
      Searches the list of steps for a step with a certain name.
      Parameters:
      name - The name of the step to look for
      Returns:
      The step information or null if no nothing was found.
    • findStep

      public StepMeta findStep(String name, StepMeta exclude)
      Searches the list of steps for a step with a certain name while excluding one step.
      Parameters:
      name - The name of the step to look for
      exclude - The step information to exclude.
      Returns:
      The step information or null if nothing was found.
    • findTransHop

      public TransHopMeta findTransHop(String name)
      Searches the list of hops for a hop with a certain name.
      Parameters:
      name - The name of the hop to look for
      Returns:
      The hop information or null if nothing was found.
    • findTransHopFrom

      public TransHopMeta findTransHopFrom(StepMeta fromstep)
      Search all hops for a hop where a certain step is at the start.
      Parameters:
      fromstep - The step at the start of the hop.
      Returns:
      The hop or null if no hop was found.
    • findAllTransHopFrom

      public List<TransHopMeta> findAllTransHopFrom(StepMeta fromstep)
    • findTransHop

      public TransHopMeta findTransHop(TransHopMeta hi)
      Find a certain hop in the transformation.
      Parameters:
      hi - The hop information to look for.
      Returns:
      The hop or null if no hop was found.
    • findTransHop

      public TransHopMeta findTransHop(StepMeta from, StepMeta to)
      Search all hops for a hop where a certain step is at the start and another is at the end.
      Parameters:
      from - The step at the start of the hop.
      to - The step at the end of the hop.
      Returns:
      The hop or null if no hop was found.
    • findTransHop

      public TransHopMeta findTransHop(StepMeta from, StepMeta to, boolean disabledToo)
      Search all hops for a hop where a certain step is at the start and another is at the end.
      Parameters:
      from - The step at the start of the hop.
      to - The step at the end of the hop.
      disabledToo - the disabled too
      Returns:
      The hop or null if no hop was found.
    • findTransHopTo

      public TransHopMeta findTransHopTo(StepMeta tostep)
      Search all hops for a hop where a certain step is at the end.
      Parameters:
      tostep - The step at the end of the hop.
      Returns:
      The hop or null if no hop was found.
    • isStepInformative

      public boolean isStepInformative(StepMeta this_step, StepMeta prev_step)
      Determines whether or not a certain step is informative. This means that the previous step is sending information to this step, but only informative. This means that this step is using the information to process the actual stream of data. We use this in StreamLookup, TableInput and other types of steps.
      Parameters:
      this_step - The step that is receiving information.
      prev_step - The step that is sending information
      Returns:
      true if prev_step if informative for this_step.
    • findNrPrevSteps

      @Deprecated public int findNrPrevSteps(String stepname)
      Deprecated.
      Counts the number of previous steps for a step name.
      Parameters:
      stepname - The name of the step to start from
      Returns:
      The number of preceding steps.
    • findNrPrevSteps

      @Deprecated public int findNrPrevSteps(String stepname, boolean info)
      Deprecated.
      Counts the number of previous steps for a step name taking into account whether or not they are informational.
      Parameters:
      stepname - The name of the step to start from
      info - true if only the informational steps are desired, false otherwise
      Returns:
      The number of preceding steps.
    • findNrPrevSteps

      public int findNrPrevSteps(StepMeta stepMeta)
      Find the number of steps that precede the indicated step.
      Parameters:
      stepMeta - The source step
      Returns:
      The number of preceding steps found.
    • findPrevStep

      @Deprecated public StepMeta findPrevStep(String stepname, int nr)
      Deprecated.
      Find the previous step on a certain location (i.e. the specified index).
      Parameters:
      stepname - The source step name
      nr - the index into the step list
      Returns:
      The preceding step found.
    • findPrevStep

      @Deprecated public StepMeta findPrevStep(String stepname, int nr, boolean info)
      Deprecated.
      Find the previous step on a certain location taking into account the steps being informational or not.
      Parameters:
      stepname - The name of the step
      nr - The index into the step list
      info - true if only the informational steps are desired, false otherwise
      Returns:
      The step information
    • findPrevStep

      public StepMeta findPrevStep(StepMeta stepMeta, int nr)
      Find the previous step on a certain location (i.e. the specified index).
      Parameters:
      stepMeta - The source step information
      nr - the index into the hops list
      Returns:
      The preceding step found.
    • findNrPrevSteps

      @Deprecated public int findNrPrevSteps(StepMeta stepMeta, boolean info)
      Deprecated.
      please use method findPreviousSteps
      Count the number of previous steps on a certain location taking into account the steps being informational or not.
      Parameters:
      stepMeta - The name of the step
      info - true if only the informational steps are desired, false otherwise
      Returns:
      The number of preceding steps
    • findPrevStep

      @Deprecated public StepMeta findPrevStep(StepMeta stepMeta, int nr, boolean info)
      Deprecated.
      please use method findPreviousSteps
      Find the previous step on a certain location taking into account the steps being informational or not.
      Parameters:
      stepMeta - The step
      nr - The index into the hops list
      info - true if we only want the informational steps.
      Returns:
      The preceding step information
    • findPreviousSteps

      public List<StepMeta> findPreviousSteps(StepMeta stepMeta)
      Get the list of previous steps for a certain reference step. This includes the info steps.
      Parameters:
      stepMeta - The reference step
      Returns:
      The list of the preceding steps, including the info steps.
    • findPreviousSteps

      public List<StepMeta> findPreviousSteps(StepMeta stepMeta, boolean info)
      Get the previous steps on a certain location taking into account the steps being informational or not.
      Parameters:
      stepMeta - The name of the step
      info - true if we only want the informational steps.
      Returns:
      The list of the preceding steps
    • getInfoStep

      public StepMeta[] getInfoStep(StepMeta stepMeta)
      Get the informational steps for a certain step. An informational step is a step that provides information for lookups, etc.
      Parameters:
      stepMeta - The name of the step
      Returns:
      An array of the informational steps found
    • findNrInfoSteps

      public int findNrInfoSteps(StepMeta stepMeta)
      Find the the number of informational steps for a certain step.
      Parameters:
      stepMeta - The step
      Returns:
      The number of informational steps found.
    • getPrevInfoFields

      public org.pentaho.di.core.row.RowMetaInterface getPrevInfoFields(String stepname) throws org.pentaho.di.core.exception.KettleStepException
      Find the informational fields coming from an informational step into the step specified.
      Parameters:
      stepname - The name of the step
      Returns:
      A row containing fields with origin.
      Throws:
      org.pentaho.di.core.exception.KettleStepException - the kettle step exception
    • getPrevInfoFields

      public org.pentaho.di.core.row.RowMetaInterface getPrevInfoFields(StepMeta stepMeta) throws org.pentaho.di.core.exception.KettleStepException
      Find the informational fields coming from an informational step into the step specified.
      Parameters:
      stepMeta - The receiving step
      Returns:
      A row containing fields with origin.
      Throws:
      org.pentaho.di.core.exception.KettleStepException - the kettle step exception
    • findNrNextSteps

      @Deprecated public int findNrNextSteps(StepMeta stepMeta)
      Deprecated.
      Find the number of succeeding steps for a certain originating step.
      Parameters:
      stepMeta - The originating step
      Returns:
      The number of succeeding steps.
    • findNextStep

      @Deprecated public StepMeta findNextStep(StepMeta stepMeta, int nr)
      Deprecated.
      Find the succeeding step at a location for an originating step.
      Parameters:
      stepMeta - The originating step
      nr - The location
      Returns:
      The step found.
    • getPrevSteps

      public StepMeta[] getPrevSteps(StepMeta stepMeta)
      Retrieve an array of preceding steps for a certain destination step. This includes the info steps.
      Parameters:
      stepMeta - The destination step
      Returns:
      An array containing the preceding steps.
    • getPrevStepNames

      public String[] getPrevStepNames(String stepname)
      Retrieve an array of succeeding step names for a certain originating step name.
      Parameters:
      stepname - The originating step name
      Returns:
      An array of succeeding step names
    • getPrevStepNames

      public String[] getPrevStepNames(StepMeta stepMeta)
      Retrieve an array of preceding steps for a certain destination step.
      Parameters:
      stepMeta - The destination step
      Returns:
      an array of preceding step names.
    • getNextSteps

      @Deprecated public StepMeta[] getNextSteps(StepMeta stepMeta)
      Deprecated.
      use findNextSteps instead
      Retrieve an array of succeeding steps for a certain originating step.
      Parameters:
      stepMeta - The originating step
      Returns:
      an array of succeeding steps.
    • findNextSteps

      public List<StepMeta> findNextSteps(StepMeta stepMeta)
      Retrieve a list of succeeding steps for a certain originating step.
      Parameters:
      stepMeta - The originating step
      Returns:
      an array of succeeding steps.
    • getNextStepNames

      public String[] getNextStepNames(StepMeta stepMeta)
      Retrieve an array of succeeding step names for a certain originating step.
      Parameters:
      stepMeta - The originating step
      Returns:
      an array of succeeding step names.
    • getStep

      public StepMeta getStep(int x, int y, int iconsize)
      Find the step that is located on a certain point on the canvas, taking into account the icon size.
      Parameters:
      x - the x-coordinate of the point queried
      y - the y-coordinate of the point queried
      iconsize - the iconsize
      Returns:
      The step information if a step is located at the point. Otherwise, if no step was found: null.
    • partOfTransHop

      public boolean partOfTransHop(StepMeta stepMeta)
      Determines whether or not a certain step is part of a hop.
      Parameters:
      stepMeta - The step queried
      Returns:
      true if the step is part of a hop.
    • getStepFields

      public org.pentaho.di.core.row.RowMetaInterface getStepFields(String stepname) throws org.pentaho.di.core.exception.KettleStepException
      Returns the fields that are emitted by a certain step name.
      Parameters:
      stepname - The stepname of the step to be queried.
      Returns:
      A row containing the fields emitted.
      Throws:
      org.pentaho.di.core.exception.KettleStepException - the kettle step exception
    • getStepFields

      public org.pentaho.di.core.row.RowMetaInterface getStepFields(StepMeta stepMeta) throws org.pentaho.di.core.exception.KettleStepException
      Returns the fields that are emitted by a certain step.
      Parameters:
      stepMeta - The step to be queried.
      Returns:
      A row containing the fields emitted.
      Throws:
      org.pentaho.di.core.exception.KettleStepException - the kettle step exception
    • getStepFields

      public org.pentaho.di.core.row.RowMetaInterface getStepFields(StepMeta[] stepMeta) throws org.pentaho.di.core.exception.KettleStepException
      Gets the fields for each of the specified steps and merges them into a single set
      Parameters:
      stepMeta - the step meta
      Returns:
      an interface to the step fields
      Throws:
      org.pentaho.di.core.exception.KettleStepException - the kettle step exception
    • getStepFields

      public org.pentaho.di.core.row.RowMetaInterface getStepFields(StepMeta stepMeta, org.pentaho.di.core.ProgressMonitorListener monitor) throws org.pentaho.di.core.exception.KettleStepException
      Returns the fields that are emitted by a certain step.
      Parameters:
      stepMeta - The step to be queried.
      monitor - The progress monitor for progress dialog. (null if not used!)
      Returns:
      A row containing the fields emitted.
      Throws:
      org.pentaho.di.core.exception.KettleStepException - the kettle step exception
    • getStepFields

      public org.pentaho.di.core.row.RowMetaInterface getStepFields(StepMeta stepMeta, StepMeta targetStep, org.pentaho.di.core.ProgressMonitorListener monitor) throws org.pentaho.di.core.exception.KettleStepException
      Returns the fields that are emitted by a certain step.
      Parameters:
      stepMeta - The step to be queried.
      targetStep - the target step
      monitor - The progress monitor for progress dialog. (null if not used!)
      Returns:
      A row containing the fields emitted.
      Throws:
      org.pentaho.di.core.exception.KettleStepException - the kettle step exception
    • getPrevStepFields

      public org.pentaho.di.core.row.RowMetaInterface getPrevStepFields(String stepname) throws org.pentaho.di.core.exception.KettleStepException
      Find the fields that are entering a step with a certain name.
      Parameters:
      stepname - The name of the step queried
      Returns:
      A row containing the fields (w/ origin) entering the step
      Throws:
      org.pentaho.di.core.exception.KettleStepException - the kettle step exception
    • getPrevStepFields

      public org.pentaho.di.core.row.RowMetaInterface getPrevStepFields(StepMeta stepMeta) throws org.pentaho.di.core.exception.KettleStepException
      Find the fields that are entering a certain step.
      Parameters:
      stepMeta - The step queried
      Returns:
      A row containing the fields (w/ origin) entering the step
      Throws:
      org.pentaho.di.core.exception.KettleStepException - the kettle step exception
    • getPrevStepFields

      public org.pentaho.di.core.row.RowMetaInterface getPrevStepFields(StepMeta stepMeta, org.pentaho.di.core.ProgressMonitorListener monitor) throws org.pentaho.di.core.exception.KettleStepException
      Find the fields that are entering a certain step.
      Parameters:
      stepMeta - The step queried
      monitor - The progress monitor for progress dialog. (null if not used!)
      Returns:
      A row containing the fields (w/ origin) entering the step
      Throws:
      org.pentaho.di.core.exception.KettleStepException - the kettle step exception
    • getPrevStepFields

      public org.pentaho.di.core.row.RowMetaInterface getPrevStepFields(StepMeta stepMeta, String stepName, org.pentaho.di.core.ProgressMonitorListener monitor) throws org.pentaho.di.core.exception.KettleStepException
      Throws:
      org.pentaho.di.core.exception.KettleStepException
    • getThisStepFields

      public org.pentaho.di.core.row.RowMetaInterface getThisStepFields(String stepname, org.pentaho.di.core.row.RowMetaInterface row) throws org.pentaho.di.core.exception.KettleStepException
      Return the fields that are emitted by a step with a certain name.
      Parameters:
      stepname - The name of the step that's being queried.
      row - A row containing the input fields or an empty row if no input is required.
      Returns:
      A Row containing the output fields.
      Throws:
      org.pentaho.di.core.exception.KettleStepException - the kettle step exception
    • getThisStepFields

      public org.pentaho.di.core.row.RowMetaInterface getThisStepFields(StepMeta stepMeta, StepMeta nextStep, org.pentaho.di.core.row.RowMetaInterface row) throws org.pentaho.di.core.exception.KettleStepException
      Returns the fields that are emitted by a step.
      Parameters:
      stepMeta - : The StepMeta object that's being queried
      nextStep - : if non-null this is the next step that's call back to ask what's being sent
      row - : A row containing the input fields or an empty row if no input is required.
      Returns:
      A Row containing the output fields.
      Throws:
      org.pentaho.di.core.exception.KettleStepException - the kettle step exception
    • getThisStepFields

      public org.pentaho.di.core.row.RowMetaInterface getThisStepFields(StepMeta stepMeta, StepMeta nextStep, org.pentaho.di.core.row.RowMetaInterface row, org.pentaho.di.core.ProgressMonitorListener monitor) throws org.pentaho.di.core.exception.KettleStepException
      Returns the fields that are emitted by a step.
      Parameters:
      stepMeta - : The StepMeta object that's being queried
      nextStep - : if non-null this is the next step that's call back to ask what's being sent
      row - : A row containing the input fields or an empty row if no input is required.
      monitor - the monitor
      Returns:
      A Row containing the output fields.
      Throws:
      org.pentaho.di.core.exception.KettleStepException - the kettle step exception
    • isUsingPartitionSchema

      public boolean isUsingPartitionSchema(PartitionSchema partitionSchema)
      Checks if the transformation is using the specified partition schema.
      Parameters:
      partitionSchema - the partition schema
      Returns:
      true if the transformation is using the partition schema, false otherwise
    • isUsingAClusterSchema

      public boolean isUsingAClusterSchema()
      Checks if the transformation is using a cluster schema.
      Returns:
      true if a cluster schema is used on one or more steps in this transformation, false otherwise
    • isUsingClusterSchema

      public boolean isUsingClusterSchema(ClusterSchema clusterSchema)
      Checks if the transformation is using the specified cluster schema.
      Parameters:
      clusterSchema - the cluster schema to check
      Returns:
      true if the specified cluster schema is used on one or more steps in this transformation
    • isUsingSlaveServer

      public boolean isUsingSlaveServer(SlaveServer slaveServer) throws org.pentaho.di.core.exception.KettleException
      Checks if the transformation is using the specified slave server.
      Parameters:
      slaveServer - the slave server
      Returns:
      true if the transformation is using the slave server, false otherwise
      Throws:
      org.pentaho.di.core.exception.KettleException - if any errors occur while checking for the slave server
    • isRepReference

      public boolean isRepReference()
      Checks if the transformation is referenced by a repository.
      Returns:
      true if the transformation is referenced by a repository, false otherwise
    • isFileReference

      public boolean isFileReference()
      Checks if the transformation is referenced by a file. If the transformation is not referenced by a repository, it is assumed to be referenced by a file.
      Returns:
      true if the transformation is referenced by a file, false otherwise
      See Also:
    • isRepReference

      public static boolean isRepReference(String exactFilename, String exactTransname)
      Checks (using the exact filename and transformation name) if the transformation is referenced by a repository. If referenced by a repository, the exact filename should be empty and the exact transformation name should be non-empty.
      Parameters:
      exactFilename - the exact filename
      exactTransname - the exact transformation name
      Returns:
      true if the transformation is referenced by a repository, false otherwise
    • isFileReference

      public static boolean isFileReference(String exactFilename, String exactTransname)
      Checks (using the exact filename and transformation name) if the transformation is referenced by a file. If referenced by a repository, the exact filename should be non-empty and the exact transformation name should be empty.
      Parameters:
      exactFilename - the exact filename
      exactTransname - the exact transformation name
      Returns:
      true if the transformation is referenced by a file, false otherwise
      See Also:
    • indexOfTransHop

      public int indexOfTransHop(TransHopMeta hi)
      Finds the location (index) of the specified hop.
      Parameters:
      hi - The hop queried
      Returns:
      The location of the hop, or -1 if nothing was found.
    • indexOfStep

      public int indexOfStep(StepMeta stepMeta)
      Finds the location (index) of the specified step.
      Parameters:
      stepMeta - The step queried
      Returns:
      The location of the step, or -1 if nothing was found.
    • getFileType

      public String getFileType()
      Gets the file type. For TransMeta, this returns a value corresponding to Transformation
      Specified by:
      getFileType in interface EngineMetaInterface
      Returns:
      the file type
      See Also:
    • getFilterNames

      public String[] getFilterNames()
      Gets the transformation filter names.
      Specified by:
      getFilterNames in interface EngineMetaInterface
      Returns:
      the filter names
      See Also:
    • getFilterExtensions

      public String[] getFilterExtensions()
      Gets the transformation filter extensions. For TransMeta, this method returns the value of Const.STRING_TRANS_FILTER_EXT
      Specified by:
      getFilterExtensions in interface EngineMetaInterface
      Returns:
      the filter extensions
      See Also:
    • getDefaultExtension

      public String getDefaultExtension()
      Gets the default extension for a transformation. For TransMeta, this method returns the value of Const.STRING_TRANS_DEFAULT_EXT
      Specified by:
      getDefaultExtension in interface EngineMetaInterface
      Returns:
      the default extension
      See Also:
    • getXML

      public String getXML() throws org.pentaho.di.core.exception.KettleException
      Gets the XML representation of this transformation.
      Specified by:
      getXML in interface EngineMetaInterface
      Specified by:
      getXML in interface org.pentaho.di.core.xml.XMLInterface
      Returns:
      the XML representation of this transformation
      Throws:
      org.pentaho.di.core.exception.KettleException - if any errors occur during generation of the XML
      See Also:
      • XMLInterface.getXML()
    • getXML

      public String getXML(boolean includeSteps, boolean includeDatabase, boolean includeSlaves, boolean includeClusters, boolean includePartitions) throws org.pentaho.di.core.exception.KettleException
      Gets the XML representation of this transformation, including or excluding step, database, slave server, cluster, or partition information as specified by the parameters
      Parameters:
      includeSteps - whether to include step data
      includeDatabase - whether to include database data
      includeSlaves - whether to include slave server data
      includeClusters - whether to include cluster data
      includePartitions - whether to include partition data
      Returns:
      the XML representation of this transformation
      Throws:
      org.pentaho.di.core.exception.KettleException - if any errors occur during generation of the XML
    • getXML

      public String getXML(boolean includeSteps, boolean includeDatabase, boolean includeSlaves, boolean includeClusters, boolean includePartitions, boolean includeNamedParameters, boolean includeLog, boolean includeDependencies, boolean includeNotePads, boolean includeAttributeGroups) throws org.pentaho.di.core.exception.KettleException
      Gets the XML representation of this transformation, including or excluding step, database, slave server, cluster, or partition information as specified by the parameters
      Parameters:
      includeSteps - whether to include step data
      includeDatabase - whether to include database data
      includeSlaves - whether to include slave server data
      includeClusters - whether to include cluster data
      includePartitions - whether to include partition data
      includeNamedParameters - whether to include named parameters data
      includeLog - whether to include log data
      includeDependencies - whether to include dependencies data
      includeNotePads - whether to include notepads data
      includeAttributeGroups - whether to include attributes map data
      Returns:
      the XML representation of this transformation
      Throws:
      org.pentaho.di.core.exception.KettleException - if any errors occur during generation of the XML
    • areOnlyUsedConnectionsSavedToXMLInServer

      public boolean areOnlyUsedConnectionsSavedToXMLInServer()
    • loadXML

      public void loadXML(Node transnode, Repository rep, boolean setInternalVariables) throws org.pentaho.di.core.exception.KettleXMLException, org.pentaho.di.core.exception.KettleMissingPluginsException
      Parses an XML DOM (starting at the specified Node) that describes the transformation.
      Parameters:
      transnode - The XML node to load from
      rep - The repository to load the default list of database connections from (null if no repository is available)
      setInternalVariables - true if you want to set the internal variables based on this transformation information
      Throws:
      org.pentaho.di.core.exception.KettleXMLException - if any errors occur during parsing of the specified file
      org.pentaho.di.core.exception.KettleMissingPluginsException - in case missing plugins were found (details are in the exception in that case)
    • loadXML

      public void loadXML(Node transnode, Repository rep, boolean setInternalVariables, org.pentaho.di.core.variables.VariableSpace parentVariableSpace) throws org.pentaho.di.core.exception.KettleXMLException, org.pentaho.di.core.exception.KettleMissingPluginsException
      Parses an XML DOM (starting at the specified Node) that describes the transformation.
      Parameters:
      transnode - The XML node to load from
      rep - The repository to load the default list of database connections from (null if no repository is available)
      setInternalVariables - true if you want to set the internal variables based on this transformation information
      parentVariableSpace - the parent variable space to use during TransMeta construction
      Throws:
      org.pentaho.di.core.exception.KettleXMLException - if any errors occur during parsing of the specified file
      org.pentaho.di.core.exception.KettleMissingPluginsException - in case missing plugins were found (details are in the exception in that case)
    • loadXML

      public void loadXML(Node transnode, Repository rep, boolean setInternalVariables, org.pentaho.di.core.variables.VariableSpace parentVariableSpace, org.pentaho.di.core.gui.OverwritePrompter prompter) throws org.pentaho.di.core.exception.KettleXMLException, org.pentaho.di.core.exception.KettleMissingPluginsException
      Parses an XML DOM (starting at the specified Node) that describes the transformation.
      Parameters:
      transnode - The XML node to load from
      rep - The repository to load the default list of database connections from (null if no repository is available)
      setInternalVariables - true if you want to set the internal variables based on this transformation information
      parentVariableSpace - the parent variable space to use during TransMeta construction
      prompter - the changed/replace listener or null if there is none
      Throws:
      org.pentaho.di.core.exception.KettleXMLException - if any errors occur during parsing of the specified file
      org.pentaho.di.core.exception.KettleMissingPluginsException - in case missing plugins were found (details are in the exception in that case)
    • loadXML

      public void loadXML(Node transnode, String fname, Repository rep, boolean setInternalVariables, org.pentaho.di.core.variables.VariableSpace parentVariableSpace, org.pentaho.di.core.gui.OverwritePrompter prompter) throws org.pentaho.di.core.exception.KettleXMLException, org.pentaho.di.core.exception.KettleMissingPluginsException
      Parses an XML DOM (starting at the specified Node) that describes the transformation.
      Parameters:
      transnode - The XML node to load from
      fname - The filename
      rep - The repository to load the default list of database connections from (null if no repository is available)
      setInternalVariables - true if you want to set the internal variables based on this transformation information
      parentVariableSpace - the parent variable space to use during TransMeta construction
      prompter - the changed/replace listener or null if there is none
      Throws:
      org.pentaho.di.core.exception.KettleXMLException - if any errors occur during parsing of the specified file
      org.pentaho.di.core.exception.KettleMissingPluginsException - in case missing plugins were found (details are in the exception in that case)
    • loadXML

      public void loadXML(Node transnode, String fname, org.pentaho.metastore.api.IMetaStore metaStore, Repository rep, boolean setInternalVariables, org.pentaho.di.core.variables.VariableSpace parentVariableSpace, org.pentaho.di.core.gui.OverwritePrompter prompter) throws org.pentaho.di.core.exception.KettleXMLException, org.pentaho.di.core.exception.KettleMissingPluginsException
      Parses an XML DOM (starting at the specified Node) that describes the transformation.
      Parameters:
      transnode - The XML node to load from
      fname - The filename
      rep - The repository to load the default list of database connections from (null if no repository is available)
      setInternalVariables - true if you want to set the internal variables based on this transformation information
      parentVariableSpace - the parent variable space to use during TransMeta construction
      prompter - the changed/replace listener or null if there is none
      Throws:
      org.pentaho.di.core.exception.KettleXMLException - if any errors occur during parsing of the specified file
      org.pentaho.di.core.exception.KettleMissingPluginsException - in case missing plugins were found (details are in the exception in that case)
    • getKey

      public byte[] getKey()
    • setKey

      public void setKey(byte[] key)
    • isPrivateKey

      public boolean isPrivateKey()
    • setPrivateKey

      public void setPrivateKey(boolean privateKey)
    • loadSharedObject

      public boolean loadSharedObject(org.pentaho.di.shared.SharedObjectInterface object)
      Overrides:
      loadSharedObject in class AbstractMeta
    • getTransHopSteps

      public List<StepMeta> getTransHopSteps(boolean all)
      Gets a List of all the steps that are used in at least one active hop. These steps will be used to execute the transformation. The others will not be executed.
      Update 3.0 : we also add those steps that are not linked to another hop, but have at least one remote input or output step defined.
      Parameters:
      all - true if you want to get ALL the steps from the transformation, false otherwise
      Returns:
      A List of steps
    • isStepUsedInTransHops

      public boolean isStepUsedInTransHops(StepMeta stepMeta)
      Checks if a step has been used in a hop or not.
      Parameters:
      stepMeta - The step queried.
      Returns:
      true if a step is used in a hop (active or not), false otherwise
    • isAnySelectedStepUsedInTransHops

      public boolean isAnySelectedStepUsedInTransHops()
      Checks if any selected step has been used in a hop or not.
      Returns:
      true if a step is used in a hop (active or not), false otherwise
    • clearChanged

      public void clearChanged()
      Clears the different changed flags of the transformation.
      Specified by:
      clearChanged in interface ChangedFlagInterface
      Specified by:
      clearChanged in interface EngineMetaInterface
      Overrides:
      clearChanged in class AbstractMeta
    • haveStepsChanged

      public boolean haveStepsChanged()
      Checks whether or not the steps have changed.
      Returns:
      true if the steps have been changed, false otherwise
    • haveHopsChanged

      public boolean haveHopsChanged()
      Checks whether or not any of the hops have been changed.
      Returns:
      true if a hop has been changed, false otherwise
    • havePartitionSchemasChanged

      public boolean havePartitionSchemasChanged()
      Checks whether or not any of the partitioning schemas have been changed.
      Returns:
      true if the partitioning schemas have been changed, false otherwise
    • haveClusterSchemasChanged

      public boolean haveClusterSchemasChanged()
      Checks whether or not any of the clustering schemas have been changed.
      Returns:
      true if the clustering schemas have been changed, false otherwise
    • hasChanged

      public boolean hasChanged()
      Checks whether or not the transformation has changed.
      Specified by:
      hasChanged in interface ChangedFlagInterface
      Overrides:
      hasChanged in class AbstractMeta
      Returns:
      true if the transformation has changed, false otherwise
    • hasLoop

      public boolean hasLoop(StepMeta stepMeta)
      See if there are any loops in the transformation, starting at the indicated step. This works by looking at all the previous steps. If you keep going backward and find the step, there is a loop. Both the informational and the normal steps need to be checked for loops!
      Parameters:
      stepMeta - The step position to start looking
      Returns:
      true if a loop has been found, false if no loop is found.
    • hasLoop

      @Deprecated public boolean hasLoop(StepMeta stepMeta, StepMeta lookup, boolean info)
      Deprecated.
    • hasLoop

      public boolean hasLoop(StepMeta stepMeta, StepMeta lookup)
      Checks for loop.
      Parameters:
      stepMeta - the stepmeta
      lookup - the lookup
      Returns:
      true, if successful
    • selectAll

      public void selectAll()
      Mark all steps in the transformation as selected.
    • unselectAll

      public void unselectAll()
      Clear the selection of all steps.
    • getSelectedStepLocations

      public org.pentaho.di.core.gui.Point[] getSelectedStepLocations()
      Get an array of all the selected step locations.
      Returns:
      The selected step locations.
    • getSelectedNoteLocations

      public org.pentaho.di.core.gui.Point[] getSelectedNoteLocations()
      Get an array of all the selected note locations.
      Returns:
      The selected note locations.
    • getSelectedSteps

      public List<StepMeta> getSelectedSteps()
      Gets a list of the selected steps.
      Returns:
      A list of all the selected steps.
    • getSelectedStepNames

      public String[] getSelectedStepNames()
      Gets an array of all the selected step names.
      Returns:
      An array of all the selected step names.
    • getStepIndexes

      public int[] getStepIndexes(List<StepMeta> steps)
      Gets an array of the locations of an array of steps.
      Parameters:
      steps - An array of steps
      Returns:
      an array of the locations of an array of steps
    • getMaximum

      public org.pentaho.di.core.gui.Point getMaximum()
      Gets the maximum size of the canvas by calculating the maximum location of a step.
      Returns:
      Maximum coordinate of a step in the transformation + (100,100) for safety.
    • getMinimum

      public org.pentaho.di.core.gui.Point getMinimum()
      Gets the minimum point on the canvas of a transformation.
      Returns:
      Minimum coordinate of a step in the transformation
    • getStepNames

      public String[] getStepNames()
      Gets the names of all the steps.
      Returns:
      An array of step names.
    • getStepsArray

      public StepMeta[] getStepsArray()
      Gets all the steps as an array.
      Returns:
      An array of all the steps in the transformation.
    • findPrevious

      public boolean findPrevious(StepMeta startStep, StepMeta stepToFind)
      Looks in the transformation to find a step in a previous location starting somewhere.
      Parameters:
      startStep - The starting step
      stepToFind - The step to look for backward in the transformation
      Returns:
      true if we can find the step in an earlier location in the transformation.
    • sortSteps

      public void sortSteps()
      Puts the steps in alphabetical order.
    • sortHops

      public void sortHops()
      Sorts all the hops in the transformation.
    • sortStepsNatural

      public Map<StepMeta,Map<StepMeta,Boolean>> sortStepsNatural()
      Puts the steps in a more natural order: from start to finish. For the moment, we ignore splits and joins. Splits and joins can't be listed sequentially in any case!
      Returns:
      a map containing all the previous steps per step
    • sortHopsNatural

      public void sortHopsNatural()
      Sorts the hops in a natural way: from beginning to end.
    • analyseImpact

      public void analyseImpact(List<DatabaseImpact> impact, org.pentaho.di.core.ProgressMonitorListener monitor) throws org.pentaho.di.core.exception.KettleStepException
      Determines the impact of the different steps in a transformation on databases, tables and field.
      Parameters:
      impact - An ArrayList of DatabaseImpact objects.
      monitor - a progress monitor listener to be updated as the transformation is analyzed
      Throws:
      org.pentaho.di.core.exception.KettleStepException - if any errors occur during analysis
    • getAlternativeStepname

      public String getAlternativeStepname(String stepname)
      Proposes an alternative stepname when the original already exists.
      Parameters:
      stepname - The stepname to find an alternative for
      Returns:
      The suggested alternative stepname.
    • getSQLStatements

      public List<org.pentaho.di.core.SQLStatement> getSQLStatements() throws org.pentaho.di.core.exception.KettleStepException
      Builds a list of all the SQL statements that this transformation needs in order to work properly.
      Returns:
      An ArrayList of SQLStatement objects.
      Throws:
      org.pentaho.di.core.exception.KettleStepException - if any errors occur during SQL statement generation
    • getSQLStatements

      public List<org.pentaho.di.core.SQLStatement> getSQLStatements(org.pentaho.di.core.ProgressMonitorListener monitor) throws org.pentaho.di.core.exception.KettleStepException
      Builds a list of all the SQL statements that this transformation needs in order to work properly.
      Parameters:
      monitor - a progress monitor listener to be updated as the SQL statements are generated
      Returns:
      An ArrayList of SQLStatement objects.
      Throws:
      org.pentaho.di.core.exception.KettleStepException - if any errors occur during SQL statement generation
    • getSQLStatementsString

      public String getSQLStatementsString() throws org.pentaho.di.core.exception.KettleStepException
      Get the SQL statements (needed to run this transformation) as a single String.
      Returns:
      the SQL statements needed to run this transformation
      Throws:
      org.pentaho.di.core.exception.KettleStepException - if any errors occur during SQL statement generation
    • checkSteps

      @Deprecated public void checkSteps(List<org.pentaho.di.core.CheckResultInterface> remarks, boolean only_selected, org.pentaho.di.core.ProgressMonitorListener monitor)
      Deprecated.
      Checks all the steps and fills a List of (CheckResult) remarks.
      Parameters:
      remarks - The remarks list to add to.
      only_selected - true to check only the selected steps, false for all steps
      monitor - a progress monitor listener to be updated as the SQL statements are generated
    • checkSteps

      public void checkSteps(List<org.pentaho.di.core.CheckResultInterface> remarks, boolean only_selected, org.pentaho.di.core.ProgressMonitorListener monitor, org.pentaho.di.core.variables.VariableSpace space, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore)
      Checks all the steps and fills a List of (CheckResult) remarks.
      Parameters:
      remarks - The remarks list to add to.
      only_selected - true to check only the selected steps, false for all steps
      monitor - a progress monitor listener to be updated as the SQL statements are generated
    • getResultRows

      @Deprecated public List<org.pentaho.di.core.RowMetaAndData> getResultRows()
      Deprecated.
      Moved to Trans to make this class stateless
      Gets the result rows.
      Returns:
      a list containing the result rows.
    • setResultRows

      @Deprecated public void setResultRows(List<org.pentaho.di.core.RowMetaAndData> resultRows)
      Deprecated.
      Moved to Trans to make this class stateless
      Sets the list of result rows.
      Parameters:
      resultRows - The list of result rows to set.
    • getPathAndName

      public String getPathAndName()
      Gets the repository directory path and name of the transformation.
      Returns:
      The repository directory path plus the name of the transformation
    • getArguments

      @Deprecated public String[] getArguments()
      Deprecated.
      moved to Trans
      Gets the arguments used for this transformation.
      Returns:
      an array of String arguments for the transformation
    • setArguments

      @Deprecated public void setArguments(String[] arguments)
      Deprecated.
      moved to Trans
      Sets the arguments used for this transformation.
      Parameters:
      arguments - The arguments to set.
    • getCounters

      @Deprecated public Hashtable<String,org.pentaho.di.core.Counter> getCounters()
      Deprecated.
      moved to Trans
      Gets the counters (database sequence values, e.g.) for the transformation.
      Returns:
      a named table of counters.
    • setCounters

      @Deprecated public void setCounters(Hashtable<String,org.pentaho.di.core.Counter> counters)
      Deprecated.
      moved to Trans
      Sets the counters (database sequence values, e.g.) for the transformation.
      Parameters:
      counters - The counters to set.
    • getDependencies

      public List<TransDependency> getDependencies()
      Gets a list of dependencies for the transformation
      Returns:
      a list of the dependencies for the transformation
    • setDependencies

      public void setDependencies(List<TransDependency> dependencies)
      Sets the dependencies for the transformation.
      Parameters:
      dependencies - The dependency list to set.
    • getMaxDateConnection

      public org.pentaho.di.core.database.DatabaseMeta getMaxDateConnection()
      Gets the database connection associated with "max date" processing. The connection, along with a specified table and field, allows for the filtering of the number of rows to process in a transformation by time, such as only processing the rows/records since the last time the transformation ran correctly. This can be used for auditing and throttling data during warehousing operations.
      Returns:
      Returns the meta-data associated with the most recent database connection.
    • setMaxDateConnection

      public void setMaxDateConnection(org.pentaho.di.core.database.DatabaseMeta maxDateConnection)
      Sets the database connection associated with "max date" processing.
      Parameters:
      maxDateConnection - the database meta-data to set
      See Also:
    • getMaxDateDifference

      public double getMaxDateDifference()
      Gets the maximum date difference between start and end dates for row/record processing. This can be used for auditing and throttling data during warehousing operations.
      Returns:
      the maximum date difference
    • setMaxDateDifference

      public void setMaxDateDifference(double maxDateDifference)
      Sets the maximum date difference between start and end dates for row/record processing.
      Parameters:
      maxDateDifference - The date difference to set.
      See Also:
    • getMaxDateField

      public String getMaxDateField()
      Gets the date field associated with "max date" processing. This allows for the filtering of the number of rows to process in a transformation by time, such as only processing the rows/records since the last time the transformation ran correctly. This can be used for auditing and throttling data during warehousing operations.
      Returns:
      a string representing the date for the most recent database connection.
      See Also:
    • setMaxDateField

      public void setMaxDateField(String maxDateField)
      Sets the date field associated with "max date" processing.
      Parameters:
      maxDateField - The date field to set.
      See Also:
    • getMaxDateOffset

      public double getMaxDateOffset()
      Gets the amount by which to increase the "max date" difference. This is used in "max date" processing, and can be used to provide more fine-grained control of the date range. For example, if the end date specifies a minute for which the data is not complete, you can "roll-back" the end date by one minute by
      Returns:
      Returns the maxDateOffset.
      See Also:
    • setMaxDateOffset

      public void setMaxDateOffset(double maxDateOffset)
      Sets the amount by which to increase the end date in "max date" processing. This can be used to provide more fine-grained control of the date range. For example, if the end date specifies a minute for which the data is not complete, you can "roll-back" the end date by one minute by setting the offset to -60.
      Parameters:
      maxDateOffset - The maxDateOffset to set.
    • getMaxDateTable

      public String getMaxDateTable()
      Gets the database table providing a date to be used in "max date" processing. This allows for the filtering of the number of rows to process in a transformation by time, such as only processing the rows/records since the last time the transformation ran correctly.
      Returns:
      Returns the maxDateTable.
      See Also:
    • setMaxDateTable

      public void setMaxDateTable(String maxDateTable)
      Sets the table name associated with "max date" processing.
      Parameters:
      maxDateTable - The maxDateTable to set.
      See Also:
    • getSizeRowset

      public int getSizeRowset()
      Gets the size of the rowsets.
      Returns:
      Returns the size of the rowsets.
    • setSizeRowset

      public void setSizeRowset(int sizeRowset)
      Sets the size of the rowsets. This method allows you to change the size of the buffers between the connected steps in a transformation. NOTE: Do not change this parameter unless you are running low on memory, for example.
      Parameters:
      sizeRowset - The sizeRowset to set.
    • getDbCache

      public org.pentaho.di.core.DBCache getDbCache()
      Gets the database cache object.
      Returns:
      the database cache object.
    • setDbCache

      public void setDbCache(org.pentaho.di.core.DBCache dbCache)
      Sets the database cache object.
      Parameters:
      dbCache - the database cache object to set
    • getTransversion

      public String getTransversion()
      Gets the version of the transformation.
      Returns:
      The version of the transformation
    • setTransversion

      public void setTransversion(String n)
      Sets the version of the transformation.
      Parameters:
      n - The new version description of the transformation
    • setTransstatus

      public void setTransstatus(int n)
      Sets the status of the transformation.
      Parameters:
      n - The new status description of the transformation
    • getTransstatus

      public int getTransstatus()
      Gets the status of the transformation.
      Returns:
      The status of the transformation
    • toString

      public String toString()
      Gets a textual representation of the transformation. If its name has been set, it will be returned, otherwise the classname is returned.
      Overrides:
      toString in class Object
      Returns:
      the textual representation of the transformation.
    • cancelQueries

      public void cancelQueries() throws org.pentaho.di.core.exception.KettleDatabaseException
      Cancels queries opened for checking & fieldprediction.
      Throws:
      org.pentaho.di.core.exception.KettleDatabaseException - if any errors occur during query cancellation
    • getUsedArguments

      public Map<String,String> getUsedArguments(String[] arguments)
      Gets the arguments (and their values) used by this transformation. If argument values are supplied by parameter, the values will used for the arguments. If the values are null or empty, the method will attempt to use argument values from a previous execution.
      Parameters:
      arguments - the values for the arguments
      Returns:
      A row with the used arguments (and their values) in it.
    • getSleepTimeEmpty

      public int getSleepTimeEmpty()
      Gets the amount of time (in nano-seconds) to wait while the input buffer is empty.
      Returns:
      the number of nano-seconds to wait while the input buffer is empty.
    • getSleepTimeFull

      public int getSleepTimeFull()
      Gets the amount of time (in nano-seconds) to wait while the input buffer is full.
      Returns:
      the number of nano-seconds to wait while the input buffer is full.
    • setSleepTimeEmpty

      public void setSleepTimeEmpty(int sleepTimeEmpty)
      Sets the amount of time (in nano-seconds) to wait while the input buffer is empty.
      Parameters:
      sleepTimeEmpty - the number of nano-seconds to wait while the input buffer is empty.
    • setSleepTimeFull

      public void setSleepTimeFull(int sleepTimeFull)
      Sets the amount of time (in nano-seconds) to wait while the input buffer is full.
      Parameters:
      sleepTimeFull - the number of nano-seconds to wait while the input buffer is full.
    • isDatabaseConnectionUsed

      public boolean isDatabaseConnectionUsed(org.pentaho.di.core.database.DatabaseMeta databaseMeta)
      This method asks all steps in the transformation whether or not the specified database connection is used. The connection is used in the transformation if any of the steps uses it or if it is being used to log to.
      Parameters:
      databaseMeta - The connection to check
      Returns:
      true if the connection is used in this transformation.
    • getStringList

      public List<StringSearchResult> getStringList(boolean searchSteps, boolean searchDatabases, boolean searchNotes, boolean includePasswords)
      Gets a list of all the strings used in this transformation. The parameters indicate which collections to search and which to exclude.
      Parameters:
      searchSteps - true if steps should be searched, false otherwise
      searchDatabases - true if databases should be searched, false otherwise
      searchNotes - true if notes should be searched, false otherwise
      includePasswords - true if passwords should be searched, false otherwise
      Returns:
      a list of search results for strings used in the transformation.
    • getStringList

      public List<StringSearchResult> getStringList(boolean searchSteps, boolean searchDatabases, boolean searchNotes)
      Get a list of all the strings used in this transformation. The parameters indicate which collections to search and which to exclude.
      Parameters:
      searchSteps - true if steps should be searched, false otherwise
      searchDatabases - true if databases should be searched, false otherwise
      searchNotes - true if notes should be searched, false otherwise
      Returns:
      a list of search results for strings used in the transformation.
    • getUsedVariables

      public List<String> getUsedVariables()
      Gets a list of the used variables in this transformation.
      Returns:
      a list of the used variables in this transformation.
    • getPreviousResult

      @Deprecated public org.pentaho.di.core.Result getPreviousResult()
      Deprecated.
      this was moved to Trans to keep the metadata stateless
      Gets the previous result.
      Returns:
      the previous Result.
    • setPreviousResult

      @Deprecated public void setPreviousResult(org.pentaho.di.core.Result previousResult)
      Deprecated.
      this was moved to Trans to keep the metadata stateless
      Sets the previous result.
      Parameters:
      previousResult - The previous Result to set.
    • getResultFiles

      @Deprecated public List<org.pentaho.di.core.ResultFile> getResultFiles()
      Deprecated.
      this was moved to Trans to keep the metadata stateless
      Gets a list of the files in the result.
      Returns:
      a list of ResultFiles.
    • setResultFiles

      @Deprecated public void setResultFiles(List<org.pentaho.di.core.ResultFile> resultFiles)
      Deprecated.
      this was moved to Trans to keep the metadata stateless
      Sets the list of the files in the result.
      Parameters:
      resultFiles - The list of ResultFiles to set.
    • getPartitionSchemas

      public List<PartitionSchema> getPartitionSchemas()
      Gets a list of partition schemas for this transformation.
      Returns:
      a list of PartitionSchemas
    • setPartitionSchemas

      public void setPartitionSchemas(List<PartitionSchema> partitionSchemas)
      Sets the list of partition schemas for this transformation.
      Parameters:
      partitionSchemas - the list of PartitionSchemas to set
    • getPartitionSchemasNames

      public String[] getPartitionSchemasNames()
      Gets the partition schemas' names.
      Returns:
      a String array containing the available partition schema names.
    • isFeedbackShown

      public boolean isFeedbackShown()
      Checks if is feedback shown.
      Returns:
      true if feedback is shown, false otherwise
    • setFeedbackShown

      public void setFeedbackShown(boolean feedbackShown)
      Sets whether the feedback should be shown.
      Parameters:
      feedbackShown - true if feedback should be shown, false otherwise
    • getFeedbackSize

      public int getFeedbackSize()
      Gets the feedback size.
      Returns:
      the feedback size
    • setFeedbackSize

      public void setFeedbackSize(int feedbackSize)
      Sets the feedback size.
      Parameters:
      feedbackSize - the feedback size to set
    • isUsingUniqueConnections

      public boolean isUsingUniqueConnections()
      Checks if the transformation is using unique database connections.
      Returns:
      true if the transformation is using unique database connections, false otherwise
    • setUsingUniqueConnections

      public void setUsingUniqueConnections(boolean usingUniqueConnections)
      Sets whether the transformation is using unique database connections.
      Parameters:
      usingUniqueConnections - true if the transformation is using unique database connections, false otherwise
    • getClusterSchemas

      public List<ClusterSchema> getClusterSchemas()
      Gets a list of the cluster schemas used by the transformation.
      Returns:
      a list of ClusterSchemas
    • setClusterSchemas

      public void setClusterSchemas(List<ClusterSchema> clusterSchemas)
      Sets list of the cluster schemas used by the transformation.
      Parameters:
      clusterSchemas - the list of ClusterSchemas to set
    • getClusterSchemaNames

      public String[] getClusterSchemaNames()
      Gets the cluster schema names.
      Returns:
      a String array containing the cluster schemas' names
    • findPartitionSchema

      public PartitionSchema findPartitionSchema(String name)
      Find a partition schema using its name.
      Parameters:
      name - The name of the partition schema to look for.
      Returns:
      the partition with the specified name of null if nothing was found
    • findClusterSchema

      public ClusterSchema findClusterSchema(String name)
      Find a clustering schema using its name.
      Parameters:
      name - The name of the clustering schema to look for.
      Returns:
      the cluster schema with the specified name of null if nothing was found
    • addOrReplacePartitionSchema

      public void addOrReplacePartitionSchema(PartitionSchema partitionSchema)
      Add a new partition schema to the transformation if that didn't exist yet. Otherwise, replace it.
      Parameters:
      partitionSchema - The partition schema to be added.
    • addOrReplacePartitionSchema

      public void addOrReplacePartitionSchema(List<PartitionSchema> partitionSchemas)
      Add a new partition schemas to the transformation if that didn't exist yet. Otherwise, replace it.
      Parameters:
      partitionSchemas - List of partition schema to be added.
    • addOrReplaceClusterSchema

      public void addOrReplaceClusterSchema(ClusterSchema clusterSchema)
      Add a new cluster schema to the transformation if that didn't exist yet. Otherwise, replace it.
      Parameters:
      clusterSchema - The cluster schema to be added.
    • getAllSharedObjects

      protected List<org.pentaho.di.shared.SharedObjectInterface> getAllSharedObjects()
      Overrides:
      getAllSharedObjects in class AbstractMeta
    • isUsingThreadPriorityManagment

      public boolean isUsingThreadPriorityManagment()
      Checks whether the transformation is using thread priority management.
      Returns:
      true if the transformation is using thread priority management, false otherwise
    • setUsingThreadPriorityManagment

      public void setUsingThreadPriorityManagment(boolean usingThreadPriorityManagment)
      Sets whether the transformation is using thread priority management.
      Parameters:
      usingThreadPriorityManagment - true if the transformation is using thread priority management, false otherwise
    • checkRowMixingStatically

      public void checkRowMixingStatically(StepMeta stepMeta, org.pentaho.di.core.ProgressMonitorListener monitor) throws org.pentaho.di.core.exception.KettleRowException
      Check a step to see if there are no multiple steps to read from. If so, check to see if the receiving rows are all the same in layout. We only want to ONLY use the DBCache for this to prevent GUI stalls.
      Parameters:
      stepMeta - the step to check
      monitor - the monitor
      Throws:
      org.pentaho.di.core.exception.KettleRowException - in case we detect a row mixing violation
    • setInternalKettleVariables

      public void setInternalKettleVariables(org.pentaho.di.core.variables.VariableSpace var)
      Sets the internal kettle variables.
      Specified by:
      setInternalKettleVariables in class AbstractMeta
      Parameters:
      var - the new internal kettle variables
    • setInternalNameKettleVariable

      protected void setInternalNameKettleVariable(org.pentaho.di.core.variables.VariableSpace var)
      Sets the internal name kettle variable.
      Specified by:
      setInternalNameKettleVariable in class AbstractMeta
      Parameters:
      var - the new internal name kettle variable
    • setInternalFilenameKettleVariables

      protected void setInternalFilenameKettleVariables(org.pentaho.di.core.variables.VariableSpace var)
      Sets the internal filename kettle variables.
      Specified by:
      setInternalFilenameKettleVariables in class AbstractMeta
      Parameters:
      var - the new internal filename kettle variables
    • setInternalEntryCurrentDirectory

      protected void setInternalEntryCurrentDirectory()
    • findMappingInputStep

      public StepMeta findMappingInputStep(String stepname) throws org.pentaho.di.core.exception.KettleStepException
      Finds the mapping input step with the specified name. If no mapping input step is found, null is returned
      Parameters:
      stepname - the name to search for
      Returns:
      the step meta-data corresponding to the desired mapping input step, or null if no step was found
      Throws:
      org.pentaho.di.core.exception.KettleStepException - if any errors occur during the search
    • findMappingOutputStep

      public StepMeta findMappingOutputStep(String stepname) throws org.pentaho.di.core.exception.KettleStepException
      Finds the mapping output step with the specified name. If no mapping output step is found, null is returned.
      Parameters:
      stepname - the name to search for
      Returns:
      the step meta-data corresponding to the desired mapping input step, or null if no step was found
      Throws:
      org.pentaho.di.core.exception.KettleStepException - if any errors occur during the search
    • getResourceDependencies

      public List<ResourceReference> getResourceDependencies()
      Gets a list of the resource dependencies.
      Returns:
      a list of ResourceReferences
    • exportResources

      public String exportResources(org.pentaho.di.core.variables.VariableSpace space, Map<String,ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore) throws org.pentaho.di.core.exception.KettleException
      Exports the specified objects to a flat-file system, adding content with filename keys to a set of definitions. The supplied resource naming interface allows the object to name appropriately without worrying about those parts of the implementation specific details.
      Specified by:
      exportResources in interface ResourceExportInterface
      Parameters:
      space - the variable space to use
      definitions -
      resourceNamingInterface -
      repository - The repository to optionally load other resources from (to be converted to XML)
      metaStore - the metaStore in which non-kettle metadata could reside.
      Returns:
      the filename of the exported resource
      Throws:
      org.pentaho.di.core.exception.KettleException - in case something goes wrong during the export
    • getSlaveStepCopyPartitionDistribution

      public SlaveStepCopyPartitionDistribution getSlaveStepCopyPartitionDistribution()
      Gets the slave step copy partition distribution.
      Returns:
      the SlaveStepCopyPartitionDistribution
    • setSlaveStepCopyPartitionDistribution

      public void setSlaveStepCopyPartitionDistribution(SlaveStepCopyPartitionDistribution slaveStepCopyPartitionDistribution)
      Sets the slave step copy partition distribution.
      Parameters:
      slaveStepCopyPartitionDistribution - the slaveStepCopyPartitionDistribution to set
    • findFirstUsedClusterSchema

      public ClusterSchema findFirstUsedClusterSchema()
      Finds the first used cluster schema.
      Returns:
      the first used cluster schema
    • isSlaveTransformation

      public boolean isSlaveTransformation()
      Checks whether the transformation is a slave transformation.
      Returns:
      true if the transformation is a slave transformation, false otherwise
    • setSlaveTransformation

      public void setSlaveTransformation(boolean slaveTransformation)
      Sets whether the transformation is a slave transformation.
      Parameters:
      slaveTransformation - true if the transformation is a slave transformation, false otherwise
    • isCapturingStepPerformanceSnapShots

      public boolean isCapturingStepPerformanceSnapShots()
      Checks whether the transformation is capturing step performance snapshots.
      Returns:
      true if the transformation is capturing step performance snapshots, false otherwise
    • setCapturingStepPerformanceSnapShots

      public void setCapturingStepPerformanceSnapShots(boolean capturingStepPerformanceSnapShots)
      Sets whether the transformation is capturing step performance snapshots.
      Parameters:
      capturingStepPerformanceSnapShots - true if the transformation is capturing step performance snapshots, false otherwise
    • getStepPerformanceCapturingDelay

      public long getStepPerformanceCapturingDelay()
      Gets the step performance capturing delay.
      Returns:
      the step performance capturing delay
    • setStepPerformanceCapturingDelay

      public void setStepPerformanceCapturingDelay(long stepPerformanceCapturingDelay)
      Sets the step performance capturing delay.
      Parameters:
      stepPerformanceCapturingDelay - the stepPerformanceCapturingDelay to set
    • getStepPerformanceCapturingSizeLimit

      public String getStepPerformanceCapturingSizeLimit()
      Gets the step performance capturing size limit.
      Returns:
      the step performance capturing size limit
    • setStepPerformanceCapturingSizeLimit

      public void setStepPerformanceCapturingSizeLimit(String stepPerformanceCapturingSizeLimit)
      Sets the step performance capturing size limit.
      Parameters:
      stepPerformanceCapturingSizeLimit - the step performance capturing size limit to set
    • clearCaches

      public void clearCaches()
      Clears the step fields and loop caches.
    • getRepositoryElementType

      public org.pentaho.di.repository.RepositoryObjectType getRepositoryElementType()
      Gets the repository element type.
      Specified by:
      getRepositoryElementType in interface org.pentaho.di.repository.RepositoryElementInterface
      Returns:
      the repository element type
      See Also:
      • RepositoryElementInterface.getRepositoryElementType()
    • getLogChannel

      public org.pentaho.di.core.logging.LogChannelInterface getLogChannel()
      Gets the log channel.
      Returns:
      the log channel
    • getLogChannelId

      public String getLogChannelId()
      Gets the log channel ID.
      Specified by:
      getLogChannelId in interface org.pentaho.di.core.logging.LoggingObjectInterface
      Returns:
      the log channel ID
      See Also:
      • LoggingObjectInterface.getLogChannelId()
    • getObjectType

      public org.pentaho.di.core.logging.LoggingObjectType getObjectType()
      Gets the object type.
      Specified by:
      getObjectType in interface org.pentaho.di.core.logging.LoggingObjectInterface
      Returns:
      the object type
      See Also:
      • LoggingObjectInterface.getObjectType()
    • getTransLogTable

      public TransLogTable getTransLogTable()
      Gets the log table for the transformation.
      Returns:
      the log table for the transformation
    • setTransLogTable

      public void setTransLogTable(TransLogTable transLogTable)
      Sets the log table for the transformation.
      Parameters:
      transLogTable - the log table to set
    • getPerformanceLogTable

      public PerformanceLogTable getPerformanceLogTable()
      Gets the performance log table for the transformation.
      Returns:
      the performance log table for the transformation
    • setPerformanceLogTable

      public void setPerformanceLogTable(PerformanceLogTable performanceLogTable)
      Sets the performance log table for the transformation.
      Parameters:
      performanceLogTable - the performance log table to set
    • getStepLogTable

      public StepLogTable getStepLogTable()
      Gets the step log table for the transformation.
      Returns:
      the step log table for the transformation
    • setStepLogTable

      public void setStepLogTable(StepLogTable stepLogTable)
      Sets the step log table for the transformation.
      Parameters:
      stepLogTable - the step log table to set
    • getLogTables

      public List<LogTableInterface> getLogTables()
      Gets a list of the log tables (transformation, step, performance, channel) for the transformation.
      Returns:
      a list of LogTableInterfaces for the transformation
    • getTransformationType

      public TransMeta.TransformationType getTransformationType()
      Gets the transformation type.
      Returns:
      the transformationType
    • setTransformationType

      public void setTransformationType(TransMeta.TransformationType transformationType)
      Sets the transformation type.
      Parameters:
      transformationType - the transformationType to set
    • writeXML

      public void writeXML(String filename) throws org.pentaho.di.core.exception.KettleXMLException
      Utility method to write the XML of this transformation to a file, mostly for testing purposes.
      Parameters:
      filename - The filename to save to
      Throws:
      org.pentaho.di.core.exception.KettleXMLException - in case something goes wrong.
    • hasRepositoryReferences

      public boolean hasRepositoryReferences()
      Checks whether the transformation has repository references.
      Returns:
      true if the transformation has repository references, false otherwise
    • lookupRepositoryReferences

      public void lookupRepositoryReferences(Repository repository) throws org.pentaho.di.core.exception.KettleException
      Looks up the references after a repository import.
      Parameters:
      repository - the repository to reference.
      Throws:
      org.pentaho.di.core.exception.KettleException - the kettle exception
    • getMetricsLogTable

      public MetricsLogTable getMetricsLogTable()
      Returns:
      the metricsLogTable
    • setMetricsLogTable

      public void setMetricsLogTable(MetricsLogTable metricsLogTable)
      Parameters:
      metricsLogTable - the metricsLogTable to set
    • isGatheringMetrics

      public boolean isGatheringMetrics()
      Specified by:
      isGatheringMetrics in interface org.pentaho.di.core.logging.LoggingObjectInterface
    • setGatheringMetrics

      public void setGatheringMetrics(boolean gatheringMetrics)
      Specified by:
      setGatheringMetrics in interface org.pentaho.di.core.logging.LoggingObjectInterface
    • isForcingSeparateLogging

      public boolean isForcingSeparateLogging()
      Specified by:
      isForcingSeparateLogging in interface org.pentaho.di.core.logging.LoggingObjectInterface
    • setForcingSeparateLogging

      public void setForcingSeparateLogging(boolean forcingSeparateLogging)
      Specified by:
      setForcingSeparateLogging in interface org.pentaho.di.core.logging.LoggingObjectInterface
    • addStepChangeListener

      public void addStepChangeListener(StepMetaChangeListenerInterface listener)
    • addStepChangeListener

      public void addStepChangeListener(int p, StepMetaChangeListenerInterface list)
    • removeStepChangeListener

      public void removeStepChangeListener(StepMetaChangeListenerInterface list)
    • notifyAllListeners

      public void notifyAllListeners(StepMeta oldMeta, StepMeta newMeta)
    • containsStepMeta

      public boolean containsStepMeta(StepMeta stepMeta)
    • getMissingTrans

      public List<MissingTrans> getMissingTrans()
    • addMissingTrans

      public void addMissingTrans(MissingTrans trans)
    • removeMissingTrans

      public void removeMissingTrans(MissingTrans trans)
    • hasMissingPlugins

      public boolean hasMissingPlugins()
      Overrides:
      hasMissingPlugins in class AbstractMeta
    • getNamedClusterEmbedManager

      public NamedClusterEmbedManager getNamedClusterEmbedManager()
      Overrides:
      getNamedClusterEmbedManager in class AbstractMeta
    • getCacheVersion

      public int getCacheVersion() throws org.pentaho.di.core.exception.KettleException
      Returns:
      Throws:
      org.pentaho.di.core.exception.KettleException