Class BaseTransform<Meta extends ITransformMeta,​Data extends ITransformData>

  • All Implemented Interfaces:
    IExtensionData, IHasLogChannel, ILoggingObject, IVariables, IEngineComponent, ITransform
    Direct Known Subclasses:
    AbstractTransform, BaseFileInputTransform, Dummy, Injector

    public class BaseTransform<Meta extends ITransformMeta,​Data extends ITransformData>
    extends Object
    implements ITransform, IVariables, ILoggingObject, IExtensionData, IEngineComponent
    This class can be extended for the actual row processing of the implemented transform.

    The implementing class can rely mostly on the base class, and has only three important methods it implements itself. The three methods implement the transform lifecycle during pipeline execution: initialization, row processing, and clean-up.

    • Transform Initialization
      The init() method is called when a pipeline is preparing to start execution.

       public boolean init(...)
       

      Every transform is given the opportunity to do one-time initialization tasks like opening files or establishing database connections. For any transforms derived from BaseTransform it is mandatory that super.init() is called to ensure correct behavior. The method must return true in case the transform initialized correctly, it must returned false if there was an initialization error. Apache Hop will abort the execution of a pipeline in case any transform returns false upon initialization.

    • Row Processing
      Once the pipeline starts execution it enters a tight loop calling processRow() on each transform until the method returns false. Each transform typically reads a single row from the input stream, alters the row structure and fields and passes the row on to next transforms.

       public boolean processRow(...)
       

      A typical implementation queries for incoming input rows by calling getRow(), which blocks and returns a row object or null in case there is no more input. If there was an input row, the transform does the necessary row processing and calls putRow() to pass the row on to the next transform. If there are no more rows, the transform must call setOutputDone() and return false.

      Formally the method must conform to the following rules:

      • If the transform is done processing all rows, the method must call setOutputDone() and return false
      • If the transform is not done processing all rows, the method must return true. Hop will call processRow() again in this case.

    • Transform Clean-Up
      Once the pipeline is complete, Hop calls dispose() on all transforms.

       public void dispose(...)
       

      Transforms are required to deallocate resources allocated during init() or subsequent row processing. This typically means to clear all fields of the ITransformData object, and to ensure that all open files or connections are properly closed. For any transforms derived from BaseTransform it is mandatory that super.dispose() is called to ensure correct deallocation.

    • Field Detail

      • initStartDate

        protected Date initStartDate
      • executionStartDate

        protected Date executionStartDate
      • firstRowReadDate

        protected Date firstRowReadDate
      • lastRowWrittenDate

        protected Date lastRowWrittenDate
      • executionEndDate

        protected Date executionEndDate
      • first

        public boolean first
        if true then the row being processed is the first row
      • terminator

        public boolean terminator
      • terminatorRows

        public List<Object[]> terminatorRows
      • rowListeners

        protected List<IRowListener> rowListeners
        The list of IRowListener interfaces
      • deadLockCounter

        protected long deadLockCounter
        Keeps track of the number of rows read for input deadlock verification.
      • metadataProvider

        protected IHopMetadataProvider metadataProvider
        The metadata that the transform uses to load external elements from
    • Constructor Detail

      • BaseTransform

        public BaseTransform​(TransformMeta transformMeta,
                             Meta meta,
                             Data data,
                             int copyNr,
                             PipelineMeta pipelineMeta,
                             Pipeline pipeline)
        This is the base transform that forms that basis for all transforms. You can derive from this class to implement your own transforms.
        Parameters:
        transformMeta - The TransformMeta object to run.
        data - the data object to store temporary data, database connections, caches, result sets, hashtables etc.
        copyNr - The copynumber for this transform.
        pipelineMeta - The PipelineMeta of which the transform transformMeta is part of.
        pipeline - The (running) pipeline to obtain information shared among the transforms.
    • Method Detail

      • init

        public boolean init()
        Description copied from interface: ITransform
        Initialize and do work where other transforms need to wait for...
        Specified by:
        init in interface ITransform
      • dispose

        public void dispose()
        Description copied from interface: ITransform
        Dispose of this transform: close files, empty logs, etc.
        Specified by:
        dispose in interface ITransform
      • cleanup

        public void cleanup()
        Description copied from interface: ITransform
        Cleanup any left-over resources for this transform.
        Specified by:
        cleanup in interface ITransform
      • getProcessed

        public long getProcessed()
        Specified by:
        getProcessed in interface ITransform
        Returns:
        The number of "processed" lines of a transform. Well, a representable metric for that anyway.
      • setCopy

        public void setCopy​(int cop)
        Sets the copy.
        Parameters:
        cop - the new copy
      • getCopy

        public int getCopy()
        Specified by:
        getCopy in interface ITransform
        Returns:
        The transforms copy number (default 0)
      • setErrors

        public void setErrors​(long e)
        Description copied from interface: ITransform
        Sets the number of errors
        Specified by:
        setErrors in interface ITransform
        Parameters:
        e - the number of errors to set
      • incrementLinesRead

        public long incrementLinesRead()
        Increments the number of lines read from previous transforms by one
        Returns:
        Returns the new value
      • decrementLinesRead

        public long decrementLinesRead()
        Decrements the number of lines read from previous transforms by one
        Returns:
        Returns the new value
      • setLinesRead

        public void setLinesRead​(long newLinesReadValue)
        Parameters:
        newLinesReadValue - the new number of lines read from previous transforms
      • incrementLinesInput

        public long incrementLinesInput()
        Increments the number of lines read from an input source: database, file, socket, etc.
        Returns:
        the new incremented value
      • setLinesInput

        public void setLinesInput​(long newLinesInputValue)
        Parameters:
        newLinesInputValue - the new number of lines read from an input source: database, file, socket, etc.
      • incrementLinesOutput

        public long incrementLinesOutput()
        Increments the number of lines written to an output target: database, file, socket, etc.
        Returns:
        the new incremented value
      • setLinesOutput

        public void setLinesOutput​(long newLinesOutputValue)
        Parameters:
        newLinesOutputValue - the new number of lines written to an output target: database, file, socket, etc.
      • incrementLinesWritten

        public long incrementLinesWritten()
        Increments the number of lines written to next transforms by one
        Returns:
        Returns the new value
      • decrementLinesWritten

        public long decrementLinesWritten()
        Decrements the number of lines written to next transforms by one
        Returns:
        Returns the new value
      • setLinesWritten

        public void setLinesWritten​(long newLinesWrittenValue)
        Set the number of lines written to next transforms
        Parameters:
        newLinesWrittenValue - the new number of lines written to next transforms
      • incrementLinesUpdated

        public long incrementLinesUpdated()
        Increments the number of lines updated in an output target: database, file, socket, etc.
        Returns:
        the new incremented value
      • setLinesUpdated

        public void setLinesUpdated​(long newLinesUpdatedValue)
        Parameters:
        newLinesUpdatedValue - the new number of lines updated in an output target: database, file, socket, etc.
      • getLinesRejected

        public long getLinesRejected()
        Get the number of lines rejected to an error handling transform
        Specified by:
        getLinesRejected in interface IEngineComponent
        Specified by:
        getLinesRejected in interface ITransform
        Returns:
        the number of lines rejected to an error handling transform
      • incrementLinesRejected

        public long incrementLinesRejected()
        Increments the number of lines rejected to an error handling transform
        Returns:
        the new incremented value
      • setLinesRejected

        public void setLinesRejected​(long newLinesRejectedValue)
        Specified by:
        setLinesRejected in interface ITransform
        Parameters:
        newLinesRejectedValue - lines number of lines rejected to an error handling transform
      • getLinesSkipped

        public long getLinesSkipped()
        Returns:
        the number of lines skipped
      • incrementLinesSkipped

        public long incrementLinesSkipped()
        Increments the number of lines skipped
        Returns:
        the new incremented value
      • setLinesSkipped

        public void setLinesSkipped​(long newLinesSkippedValue)
        Parameters:
        newLinesSkippedValue - lines number of lines skipped
      • isSelected

        public boolean isSelected()
        Specified by:
        isSelected in interface IEngineComponent
        Returns:
        true if the component is selected in the user interface
      • getTransformName

        public String getTransformName()
        Description copied from interface: ITransform
        Get the name of the transform.
        Specified by:
        getTransformName in interface ITransform
        Returns:
        the name of the transform
      • setTransformName

        public void setTransformName​(String transformName)
        Sets the transformName.
        Parameters:
        transformName - the new transformName
      • getMeta

        public Meta getMeta()
        Specified by:
        getMeta in interface ITransform
        Returns:
        Returns the transformMeta.
      • getData

        public Data getData()
        Gets data
        Specified by:
        getData in interface ITransform
        Returns:
        value of data
      • getPipelineMeta

        public PipelineMeta getPipelineMeta()
        Returns:
        Returns the pipelineMeta.
      • putRow

        public void putRow​(IRowMeta rowMeta,
                           Object[] row)
                    throws HopTransformException
        putRow is used to copy a row, to the alternate rowset(s) This should get priority over everything else! (synchronized) If distribute is true, a row is copied only once to the output rowsets, otherwise copies are sent to each rowset!
        Specified by:
        putRow in interface ITransform
        Parameters:
        row - The row to put to the destination rowset(s).
        rowMeta - The row to send to the destinations transforms
        Throws:
        HopTransformException
      • putRowTo

        public void putRowTo​(IRowMeta rowMeta,
                             Object[] row,
                             IRowSet rowSet)
                      throws HopTransformException
        putRowTo is used to put a row in a certain specific IRowSet.
        Parameters:
        rowMeta - The row meta-data to put to the destination IRowSet.
        row - the data to put in the IRowSet
        rowSet - the RoWset to put the row into.
        Throws:
        HopTransformException - In case something unexpected goes wrong
      • putError

        public void putError​(IRowMeta rowMeta,
                             Object[] row,
                             long nrErrors,
                             String errorDescriptions,
                             String fieldNames,
                             String errorCodes)
                      throws HopTransformException
        Put error.
        Parameters:
        rowMeta - the row meta
        row - the row
        nrErrors - the nr errors
        errorDescriptions - the error descriptions
        fieldNames - the field names
        errorCodes - the error codes
        Throws:
        HopTransformException - the hop transform exception
      • waitUntilPipelineIsStarted

        protected void waitUntilPipelineIsStarted()
        Wait until the pipeline is completely running and all threads have been started.
      • getRow

        public Object[] getRow()
                        throws HopException
        In case of getRow, we receive data from previous transforms through the input rowset. In case we split the stream, we have to copy the data to the alternate splits: rowsets 1 through n.
        Specified by:
        getRow in interface ITransform
        Returns:
        a row from the source transform(s).
        Throws:
        HopException
      • identifyErrorOutput

        public void identifyErrorOutput()
        Description copied from interface: ITransform
        To be used to flag an error output channel of a transform prior to execution for performance reasons.
        Specified by:
        identifyErrorOutput in interface ITransform
      • safeModeChecking

        public static void safeModeChecking​(IRowMeta referenceRowMeta,
                                            IRowMeta rowMeta)
                                     throws HopRowException
        Safe mode checking.
        Parameters:
        referenceRowMeta - the reference row meta
        rowMeta - the row meta
        Throws:
        HopRowException - the hop row exception
      • findInputRowSet

        public IRowSet findInputRowSet​(String from,
                                       int fromCopy,
                                       String to,
                                       int toCopy)
        Find input row set.
        Parameters:
        from - the from
        fromCopy - the fromcopy
        to - the to
        toCopy - the tocopy
        Returns:
        the row set
      • findOutputRowSet

        public IRowSet findOutputRowSet​(String from,
                                        int fromcopy,
                                        String to,
                                        int tocopy)
        Find an output rowset in a running pipeline. It will also look at the "to" transform to see if this is a mapping. If it is, it will find the appropriate rowset in that pipeline.
        Parameters:
        from -
        fromcopy -
        to -
        tocopy -
        Returns:
        The rowset or null if none is found.
      • setOutputDone

        public void setOutputDone()
        Description copied from interface: ITransform
        Signal output done to destination transforms
        Specified by:
        setOutputDone in interface ITransform
      • dispatch

        public void dispatch()
        This method finds the surrounding transforms and rowsets for this base transform. This transforms keeps it's own list of rowsets (etc.) to prevent it from having to search every time.

        Note that all rowsets input and output is already created by pipeline itself. So in this place we will look and choose which rowsets will be used by this particular transform.

        We will collect all input rowsets and output rowsets so transform will be able to read input data, and write to the output.

        Transforms can run in multiple copies, on in partitioned fashion. For this case we should take in account that in different cases we should take in account one to one, one to many and other cases properly.

      • isBasic

        public boolean isBasic()
        Checks if is basic.
        Returns:
        true, if is basic
      • isDetailed

        public boolean isDetailed()
        Checks if is detailed.
        Returns:
        true, if is detailed
      • isDebug

        public boolean isDebug()
        Checks if is debug.
        Returns:
        true, if is debug
      • isRowLevel

        public boolean isRowLevel()
        Checks if is row level.
        Returns:
        true, if is row level
      • logMinimal

        public void logMinimal​(String message)
        Log minimal.
        Parameters:
        message - the message
      • logMinimal

        public void logMinimal​(String message,
                               Object... arguments)
        Log minimal.
        Parameters:
        message - the message
        arguments - the arguments
      • logBasic

        public void logBasic​(String message)
        Log basic.
        Parameters:
        message - the message
      • logBasic

        public void logBasic​(String message,
                             Object... arguments)
        Log basic.
        Parameters:
        message - the message
        arguments - the arguments
      • logDetailed

        public void logDetailed​(String message)
        Log detailed.
        Parameters:
        message - the message
      • logDetailed

        public void logDetailed​(String message,
                                Object... arguments)
        Log detailed.
        Parameters:
        message - the message
        arguments - the arguments
      • logDebug

        public void logDebug​(String message)
        Log debug.
        Parameters:
        message - the message
      • logDebug

        public void logDebug​(String message,
                             Object... arguments)
        Log debug.
        Parameters:
        message - the message
        arguments - the arguments
      • logRowlevel

        public void logRowlevel​(String message)
        Log rowlevel.
        Parameters:
        message - the message
      • logRowlevel

        public void logRowlevel​(String message,
                                Object... arguments)
        Log rowlevel.
        Parameters:
        message - the message
        arguments - the arguments
      • logError

        public void logError​(String message)
        Log error.
        Parameters:
        message - the message
      • logError

        public void logError​(String message,
                             Throwable e)
        Log error.
        Parameters:
        message - the message
        e - the e
      • logError

        public void logError​(String message,
                             Object... arguments)
        Log error.
        Parameters:
        message - the message
        arguments - the arguments
      • outputIsDone

        public boolean outputIsDone()
        Output is done.
        Returns:
        true, if successful
      • stopAll

        public void stopAll()
        Description copied from interface: ITransform
        Flags all rowsets as stopped/completed/finished.
        Specified by:
        stopAll in interface ITransform
      • isStopped

        public boolean isStopped()
        Specified by:
        isStopped in interface IEngineComponent
        Specified by:
        isStopped in interface ITransform
        Returns:
        True if the transform is marked as stopped. Execution should stop immediate.
      • setStopped

        public void setStopped​(boolean stopped)
        Specified by:
        setStopped in interface ITransform
        Parameters:
        stopped - true if the transform needs to be stopped
      • setSafeStopped

        public void setSafeStopped​(boolean stopped)
        Specified by:
        setSafeStopped in interface ITransform
        Parameters:
        stopped - true if the transform needs to be safe stopped
      • isSafeStopped

        public boolean isSafeStopped()
        Specified by:
        isSafeStopped in interface ITransform
        Returns:
        true if transform is safe stopped.
      • setRunning

        public void setRunning​(boolean running)
        Description copied from interface: ITransform
        Flag the transform as running or not
        Specified by:
        setRunning in interface ITransform
        Parameters:
        running - the running flag to set
      • pauseRunning

        public void pauseRunning()
        Description copied from interface: ITransform
        Pause a running transform
        Specified by:
        pauseRunning in interface ITransform
      • resumeRunning

        public void resumeRunning()
        Description copied from interface: ITransform
        Resume a running transform
        Specified by:
        resumeRunning in interface ITransform
      • setPaused

        public void setPaused​(boolean paused)
        Sets the paused.
        Parameters:
        paused - the new paused
      • setPaused

        public void setPaused​(AtomicBoolean paused)
        Sets the paused.
        Parameters:
        paused - the new paused
      • isInitialising

        public boolean isInitialising()
        Checks if is initialising.
        Returns:
        true, if is initialising
      • markStart

        public void markStart()
        Description copied from interface: ITransform
        Mark the start time of the transform.
        Specified by:
        markStart in interface ITransform
      • setInternalVariables

        public void setInternalVariables()
        Sets the internal variables.
      • markStop

        public void markStop()
        Description copied from interface: ITransform
        Mark the end time of the transform.
        Specified by:
        markStop in interface ITransform
      • rowsetOutputSize

        public int rowsetOutputSize()
        Specified by:
        rowsetOutputSize in interface ITransform
        Returns:
        The total amount of rows in the output buffers
      • rowsetInputSize

        public int rowsetInputSize()
        Specified by:
        rowsetInputSize in interface ITransform
        Returns:
        The total amount of rows in the input buffers
      • stopRunning

        public void stopRunning()
                         throws HopException
        Perform actions to stop a running transform. This can be stopping running Sql queries (cancel), etc. Default it doesn't do anything.
        Specified by:
        stopRunning in interface ITransform
        Throws:
        HopException - in case something goes wrong
      • logSummary

        public void logSummary()
        Log summary.
      • getFirstInputRowSet

        protected IRowSet getFirstInputRowSet()
      • clearInputRowSets

        protected void clearInputRowSets()
      • swapFirstInputRowSetIfExists

        protected void swapFirstInputRowSetIfExists​(String transformName)
      • setInputRowSets

        public void setInputRowSets​(List<IRowSet> inputRowSets)
        Parameters:
        inputRowSets - The inputRowSets to set.
      • clearOutputRowSets

        protected void clearOutputRowSets()
      • setOutputRowSets

        public void setOutputRowSets​(List<IRowSet> outputRowSets)
        Parameters:
        outputRowSets - The outputRowSets to set.
      • isDistributed

        public boolean isDistributed()
        Returns:
        Returns the distributed.
      • setDistributed

        public void setDistributed​(boolean distributed)
        Parameters:
        distributed - The distributed to set.
      • addRowListener

        public void addRowListener​(IRowListener rowListener)
        Description copied from interface: ITransform
        Add a rowlistener to the transform allowing you to inspect (or manipulate, be careful) the rows coming in or exiting the transform.
        Specified by:
        addRowListener in interface IEngineComponent
        Specified by:
        addRowListener in interface ITransform
        Parameters:
        rowListener - the rowlistener to add
      • addResultFile

        public void addResultFile​(ResultFile resultFile)
        Adds the result file.
        Parameters:
        resultFile - the result file
      • setPartitionId

        public void setPartitionId​(String partitionId)
        Specified by:
        setPartitionId in interface ITransform
        Parameters:
        partitionId - the partitionId to set
      • setPartitionTargets

        public void setPartitionTargets​(Map<String,​BlockingRowSet> partitionTargets)
        Parameters:
        partitionTargets - the partitionTargets to set
      • getRepartitioning

        public int getRepartitioning()
        Returns:
        the repartitioning type
      • setRepartitioning

        public void setRepartitioning​(int repartitioning)
        Specified by:
        setRepartitioning in interface ITransform
        Parameters:
        repartitioning - the repartitioning type to set
      • isPartitioned

        public boolean isPartitioned()
        Specified by:
        isPartitioned in interface ITransform
        Returns:
        the partitioned
      • setPartitioned

        public void setPartitioned​(boolean partitioned)
        Specified by:
        setPartitioned in interface ITransform
        Parameters:
        partitioned - the partitioned to set
      • checkFeedback

        protected boolean checkFeedback​(long lines)
        Check feedback.
        Parameters:
        lines - the lines
        Returns:
        true, if successful
      • getInputRowMeta

        public IRowMeta getInputRowMeta()
        Returns:
        the rowMeta
      • setInputRowMeta

        public void setInputRowMeta​(IRowMeta rowMeta)
        Parameters:
        rowMeta - the rowMeta to set
      • getErrorRowMeta

        public IRowMeta getErrorRowMeta()
        Returns:
        the errorRowMeta
      • setErrorRowMeta

        public void setErrorRowMeta​(IRowMeta errorRowMeta)
        Parameters:
        errorRowMeta - the errorRowMeta to set
      • getPreviewRowMeta

        public IRowMeta getPreviewRowMeta()
        Returns:
        the previewRowMeta
      • setPreviewRowMeta

        public void setPreviewRowMeta​(IRowMeta previewRowMeta)
        Parameters:
        previewRowMeta - the previewRowMeta to set
      • initBeforeStart

        public void initBeforeStart()
                             throws HopTransformException
        This method is executed by Pipeline right before the threads start and right after initialization.

        More to the point: here we open remote output transform sockets.

        Specified by:
        initBeforeStart in interface ITransform
        Throws:
        HopTransformException - In case there is an error
      • processRow

        public boolean processRow()
                           throws HopException
        Description copied from interface: ITransform
        Perform the equivalent of processing one row. Typically this means reading a row from input (getRow()) and passing a row to output (putRow)).
        Specified by:
        processRow in interface ITransform
        Returns:
        false if no more rows can be processed or an error occurred.
        Throws:
        HopException
      • canProcessOneRow

        public boolean canProcessOneRow()
        Description copied from interface: ITransform
        This method checks if the transform is capable of processing at least one row.

        For example, if a transform has no input records but needs at least one to function, it will return false.

        Specified by:
        canProcessOneRow in interface ITransform
        Returns:
        true if the transform can process a row.
      • addTransformFinishedListener

        public void addTransformFinishedListener​(ITransformFinishedListener transformFinishedListener)
        Description copied from interface: ITransform
        Attach a transform listener to be notified when a transform finishes
        Specified by:
        addTransformFinishedListener in interface ITransform
        Parameters:
        transformFinishedListener - The listener to add to the transform
      • addTransformStartedListener

        public void addTransformStartedListener​(ITransformStartedListener transformStartedListener)
        Description copied from interface: ITransform
        Attach a transform listener to be notified when a transform starts
        Specified by:
        addTransformStartedListener in interface ITransform
        Parameters:
        transformStartedListener - The listener to add to the transform
      • getTransformFinishedListeners

        public List<ITransformFinishedListener> getTransformFinishedListeners()
        Gets transformFinishedListeners
        Returns:
        value of transformFinishedListeners
      • setTransformFinishedListeners

        public void setTransformFinishedListeners​(List<ITransformFinishedListener> transformFinishedListeners)
        Parameters:
        transformFinishedListeners - The transformFinishedListeners to set
      • getTransformStartedListeners

        public List<ITransformStartedListener> getTransformStartedListeners()
        Gets transformStartedListeners
        Returns:
        value of transformStartedListeners
      • setTransformStartedListeners

        public void setTransformStartedListeners​(List<ITransformStartedListener> transformStartedListeners)
        Parameters:
        transformStartedListeners - The transformStartedListeners to set
      • isMapping

        public boolean isMapping()
        Specified by:
        isMapping in interface ITransform
        Returns:
        true if the thread is a special mapping transform
      • getCopyNr

        public int getCopyNr()
        Gets copyNr
        Specified by:
        getCopyNr in interface IEngineComponent
        Returns:
        value of copyNr
      • setCopyNr

        public void setCopyNr​(int copyNr)
        Parameters:
        copyNr - The copyNr to set
      • setLogLevel

        public void setLogLevel​(LogLevel logLevel)
        Sets the log level.
        Specified by:
        setLogLevel in interface IEngineComponent
        Parameters:
        logLevel - the new log level
      • closeQuietly

        public static void closeQuietly​(Closeable cl)
        Close quietly.
        Parameters:
        cl - the object that can be closed.
      • getContainerId

        public String getContainerId()
        Returns the container object ID.
        Specified by:
        getContainerId in interface ILoggingObject
        Returns:
        the containerObjectId
      • setCarteObjectId

        public void setCarteObjectId​(String containerObjectId)
        Sets the container object ID.
        Parameters:
        containerObjectId - the containerObjectId to set
      • batchComplete

        public void batchComplete()
                           throws HopException
        Description copied from interface: ITransform
        When using the Single threaded engine this signals to the transform that a batch of records has been processed and that no more are expected in this batch.
        Specified by:
        batchComplete in interface ITransform
        Throws:
        HopException - In case an error occurs during the processing of the batch of rows.
        See Also:
        ITransform.batchComplete()
      • startBundle

        public void startBundle()
                         throws HopException
        Description copied from interface: ITransform
        When running in a Beam context this signals the transform that a new bundle was started. File writing transforms might want to create new files here.
        Specified by:
        startBundle in interface ITransform
        Throws:
        HopException
      • finishBundle

        public void finishBundle()
                          throws HopException
        Description copied from interface: ITransform
        When running in a Beam context this signals the transform that a bundle was finished. File writing transforms will want to close open file(s) here.
        Specified by:
        finishBundle in interface ITransform
        Throws:
        HopException
      • setMetadataProvider

        public void setMetadataProvider​(IHopMetadataProvider metadataProvider)
        Description copied from interface: ITransform
        Pass along the metadata to use when loading external elements at runtime.
        Specified by:
        setMetadataProvider in interface ITransform
        Parameters:
        metadataProvider - The metadata to use
      • getCurrentOutputRowSetNr

        public int getCurrentOutputRowSetNr()
        Specified by:
        getCurrentOutputRowSetNr in interface ITransform
        Returns:
        the index of the active (current) output row set
      • setCurrentOutputRowSetNr

        public void setCurrentOutputRowSetNr​(int index)
        Specified by:
        setCurrentOutputRowSetNr in interface ITransform
        Parameters:
        index - Sets the index of the active (current) output row set to use.
      • getCurrentInputRowSetNr

        public int getCurrentInputRowSetNr()
        Specified by:
        getCurrentInputRowSetNr in interface ITransform
        Returns:
        the index of the active (current) input row set
      • setCurrentInputRowSetNr

        public void setCurrentInputRowSetNr​(int index)
        Specified by:
        setCurrentInputRowSetNr in interface ITransform
        Parameters:
        index - Sets the index of the active (current) input row set to use.
      • setAllowEmptyFieldNamesAndTypes

        public void setAllowEmptyFieldNamesAndTypes​(boolean allowEmptyFieldNamesAndTypes)
        Sets allowEmptyFieldNamesAndTypes
        Parameters:
        allowEmptyFieldNamesAndTypes - value of allowEmptyFieldNamesAndTypes
      • isAllowEmptyFieldNamesAndTypes

        public boolean isAllowEmptyFieldNamesAndTypes()
        Gets allowEmptyFieldNamesAndTypes
        Returns:
        value of allowEmptyFieldNamesAndTypes