Class ScriptValues
java.lang.Object
org.apache.hop.pipeline.transform.BaseTransform<ScriptValuesMeta,ScriptValuesData>
org.apache.hop.pipeline.transforms.javascript.ScriptValues
- All Implemented Interfaces:
IExtensionData,IHasLogChannel,ILoggingObject,IVariables,IEngineComponent,ITransform
Executes a JavaScript on the values in the input stream. Selected calculated values can then be
put on the output stream.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intExcludes the current row from the output row set, and any remaining rows are not processed, but does not generate an error.static final intIncludes the current row in the output row set.static final intExcludes the current row from the output row set, generates an error, and any remaining rows are not processed.org.mozilla.javascript.Scriptstatic final intExcludes the current row from the output row set and continues processing on the next row.Fields inherited from class org.apache.hop.pipeline.transform.BaseTransform
data, deadLockCounter, executionEndDate, executionStartDate, extensionDataMap, first, firstRowReadDate, initStartDate, lastRowWrittenDate, log, meta, metadataProvider, rowListeners, safeStopped, terminator, terminatorRows, variables -
Constructor Summary
ConstructorsConstructorDescriptionScriptValues(TransformMeta transformMeta, ScriptValuesMeta meta, ScriptValuesData data, int copyNr, PipelineMeta pipelineMeta, Pipeline pipeline) -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()getValueFromJScript(Object result, int i) booleaninit()booleanMethods inherited from class org.apache.hop.pipeline.transform.BaseTransform
addResultFile, addRowListener, addRowSetToInputRowSets, addRowSetToOutputRowSets, addTransformFinishedListener, addTransformStartedListener, batchComplete, canProcessOneRow, checkFeedback, cleanup, clearInputRowSets, clearOutputRowSets, closeQuietly, copyFrom, decrementLinesRead, decrementLinesWritten, dispatch, findInputRowSet, findInputRowSet, findOutputRowSet, findOutputRowSet, finishBundle, getContainerId, getCopy, getCopyNr, getCurrentInputRowSetNr, getCurrentOutputRowSetNr, getData, getDispatcher, getErrorRowMeta, getErrors, getExecutionDuration, getExecutionEndDate, getExecutionStartDate, getExtensionDataMap, getFilename, getFirstInputRowSet, getFirstRowReadDate, getInitStartDate, getInputBufferSize, getInputRowMeta, getInputRowSets, getLastRowWrittenDate, getLinesInput, getLinesOutput, getLinesRead, getLinesRejected, getLinesSkipped, getLinesUpdated, getLinesWritten, getLogChannel, getLogChannelId, getLogLevel, getLogText, getMeta, getMetadataProvider, getName, getObjectCopy, getObjectName, getObjectType, getOutputBufferSize, getOutputRowSets, getParent, getParentVariables, getPartitionId, getPartitionTargets, getPipeline, getPipelineMeta, getPreviewRowMeta, getProcessed, getRegistrationDate, getRepartitioning, getResultFiles, getRow, getRowFrom, getRowHandler, getRowListeners, getStatus, getStatusDescription, getTransformFinishedListeners, getTransformMeta, getTransformName, getTransformPluginId, getTransformStartedListeners, getVariable, getVariable, getVariableBoolean, getVariableNames, handleGetRowFrom, handlePutError, handlePutRowTo, identifyErrorOutput, incrementLinesInput, incrementLinesOutput, incrementLinesRead, incrementLinesRejected, incrementLinesSkipped, incrementLinesUpdated, incrementLinesWritten, initBeforeStart, initializeFrom, isAllowEmptyFieldNamesAndTypes, isBasic, isDebug, isDetailed, isDistributed, isForcingSeparateLogging, isGatheringMetrics, isInitialising, isMapping, isPartitioned, isPaused, isRowLevel, isRunning, isSafeStopped, isSelected, isStopped, logBasic, logBasic, logDebug, logDebug, logDetailed, logDetailed, logError, logError, logError, logMinimal, logMinimal, logRowlevel, logRowlevel, logSummary, markStart, markStop, outputIsDone, pauseRunning, putError, putRow, putRowTo, removeRowListener, resolve, resolve, resolve, resumeRunning, rowsetInputSize, rowsetOutputSize, safeModeChecking, safeModeChecking, setAllowEmptyFieldNamesAndTypes, setCarteObjectId, setCopy, setCopyNr, setCurrentInputRowSetNr, setCurrentOutputRowSetNr, setDistributed, setErrorRowMeta, setErrors, setExecutionEndDate, setExecutionStartDate, setFirstRowReadDate, setForcingSeparateLogging, setGatheringMetrics, setInitStartDate, setInputRowMeta, setInputRowSets, setInternalVariables, setLastRowWrittenDate, setLinesInput, setLinesOutput, setLinesRead, setLinesRejected, setLinesSkipped, setLinesUpdated, setLinesWritten, setLogLevel, setMetadataProvider, setOutputDone, setOutputRowSets, setParentVariables, setPartitioned, setPartitionId, setPartitionTargets, setPaused, setPaused, setPreviewRowMeta, setRepartitioning, setRowHandler, setRunning, setSafeStopped, setStopped, setTransformFinishedListeners, setTransformName, setTransformStartedListeners, setVariable, setVariables, shareWith, startBundle, stopAll, stopRunning, swapFirstInputRowSetIfExists, toString, waitUntilPipelineIsStartedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hop.pipeline.transform.ITransform
subStatuses
-
Field Details
-
SKIP_PIPELINE
public static final int SKIP_PIPELINEExcludes the current row from the output row set and continues processing on the next row.- See Also:
-
ABORT_PIPELINE
public static final int ABORT_PIPELINEExcludes the current row from the output row set, and any remaining rows are not processed, but does not generate an error.- See Also:
-
ERROR_PIPELINE
public static final int ERROR_PIPELINEExcludes the current row from the output row set, generates an error, and any remaining rows are not processed.- See Also:
-
CONTINUE_PIPELINE
public static final int CONTINUE_PIPELINEIncludes the current row in the output row set.- See Also:
-
script
public org.mozilla.javascript.Script script
-
-
Constructor Details
-
ScriptValues
public ScriptValues(TransformMeta transformMeta, ScriptValuesMeta meta, ScriptValuesData data, int copyNr, PipelineMeta pipelineMeta, Pipeline pipeline)
-
-
Method Details
-
getValueFromJScript
- Throws:
HopValueException
-
getOutputRowMeta
-
processRow
- Specified by:
processRowin interfaceITransform- Overrides:
processRowin classBaseTransform<ScriptValuesMeta,ScriptValuesData> - Throws:
HopException
-
init
public boolean init()- Specified by:
initin interfaceITransform- Overrides:
initin classBaseTransform<ScriptValuesMeta,ScriptValuesData>
-
dispose
public void dispose()- Specified by:
disposein interfaceITransform- Overrides:
disposein classBaseTransform<ScriptValuesMeta,ScriptValuesData>
-