public class ConvertTextCase extends ExecutableOperator implements RecordPipelineOperator
Modifier and Type | Class and Description |
---|---|
static class |
ConvertTextCase.Case |
Constructor and Description |
---|
ConvertTextCase()
DefaultConstructor.
|
ConvertTextCase(String inputField)
Constructor specifying the tokenized text field to convert.
|
ConvertTextCase(String inputField,
ConvertTextCase.Case caseFormat)
Constructor specifying the tokenized text field to convert
and the case to use.
|
Modifier and Type | Method and Description |
---|---|
protected void |
computeMetadata(StreamingMetadataContext ctx)
Implementations must adhere to the following contracts
|
protected void |
execute(ExecutionContext ctx)
Executes the operator.
|
ConvertTextCase.Case |
getCaseFormat()
Get the case format for the conversions.
|
RecordPort |
getInput()
Get the input port of this operator.
|
String |
getInputField()
Get the field to convert to lower or upper case.
|
RecordPort |
getOutput()
Get the output port of this operator.
|
String |
getOutputField()
Get the converted output field
If unspecified will overwrite the original input field.
|
void |
setCaseFormat(ConvertTextCase.Case caseFormat)
Set the case format for the conversions.
|
void |
setInputField(String inputField)
Set the field to convert to lower or upper case.
|
void |
setOutputField(String outputField)
Set the converted output field.
|
cloneForExecution, getNumInputCopies, getPortSettings, handleInactiveOutput
disableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disableParallelism, getInputPorts, getOutputPorts
public ConvertTextCase()
setInputField(String)
and
setOutputField(String)
to set the name of the text
field to convert and its output field.public ConvertTextCase(String inputField)
inputField
- name of the field to convertpublic ConvertTextCase(String inputField, ConvertTextCase.Case caseFormat)
inputField
- name of the field to convertcaseFormat
- the case used for the conversionpublic void setInputField(String inputField)
inputField
- name of the field to convertpublic String getInputField()
public void setOutputField(String outputField)
outputField
- name of the token output fieldpublic String getOutputField()
public void setCaseFormat(ConvertTextCase.Case caseFormat)
caseFormat
- the case for the conversionspublic ConvertTextCase.Case getCaseFormat()
public RecordPort getInput()
getInput
in interface PipelineOperator<RecordPort>
public RecordPort getOutput()
getOutput
in interface PipelineOperator<RecordPort>
protected void computeMetadata(StreamingMetadataContext ctx)
StreamingOperator
StreamingMetadataContext.parallelize(ParallelismStrategy)
.
RecordPort#setRequiredDataOrdering
, otherwise data may arrive in any order.
RecordPort#setRequiredDataDistribution
, otherwise data will arrive in an unspecified partial distribution
.
RecordPort#getSourceDataDistribution
and RecordPort#getSourceDataOrdering
. These should be
viewed as a hints to help chose a more efficient algorithm. In such cases, though, operators must
still declare data ordering and data distribution requirements; otherwise there is no guarantee that
data will arrive sorted/distributed as required.
RecordPort#setType
.RecordPort#setOutputDataOrdering
RecordPort#setOutputDataDistribution
AbstractModelPort#setMergeHandler
.MergeModel
is a convenient, re-usable model reducer, parameterized with
a merge-handler.
SimpleModelPort
's have no associated metadata and therefore there is
never any output metadata to declare. PMMLPort
's, on the other hand,
do have associated metadata. For all PMMLPorts, implementations must declare
the following:
PMMLPort.setPMMLModelSpec
.
computeMetadata
in class StreamingOperator
ctx
- the contextprotected void execute(ExecutionContext ctx)
ExecutableOperator
execute
in class ExecutableOperator
ctx
- context in which to lookup physical ports bound to logical portsCopyright © 2021 Actian Corporation. All rights reserved.