Class AggregateReader
Deprecated.
A proxy that applies set functions (sum, max, etc.) to fields of records passing through.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.Base class for the set functions anAggregateReaderapplies to each record passing through it.Nested classes/interfaces inherited from class com.northconcepts.datapipeline.core.DataEndpoint
DataEndpoint.State -
Field Summary
Fields inherited from class com.northconcepts.datapipeline.core.DataReader
fieldLineage, recordLineageFields inherited from class com.northconcepts.datapipeline.core.DataEndpoint
lastRecord, PRODUCT, PRODUCT_VERSION, VENDOR, XML_INPUT_FACTORY_KEYFields inherited from class com.northconcepts.datapipeline.core.Endpoint
BUFFER_SIZE, captureElapsedTime, DEFAULT_READ_BUFFER_SIZEFields inherited from class com.northconcepts.datapipeline.core.DataObject
id, log, name, TIMESTAMP_FORMAT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(AggregateReader.AggregateOperation... operations) Deprecated.Adds operations to apply to each record; an operation replaces any existing one with the same name and field.addExceptionProperties(DataException exception) Deprecated.Adds this endpoint's current state to aDataException.Deprecated.Adds an operation averaging the field's non-null values as aDouble(NaN if there are none).clear()Deprecated.Deprecated.Adds an operation counting the records whose field is not null.getAverage(String fieldName) Deprecated.Returns the current result ofaverage(String)for the field; throws if that operation was not added.Deprecated.Returns the current result ofcount(String)for the field; throws if that operation was not added.getMaximum(String fieldName) Deprecated.Returns the current result ofmaximum(String)for the field; throws if that operation was not added.getMinimum(String fieldName) Deprecated.Returns the current result ofminimum(String)for the field; throws if that operation was not added.Deprecated.Returns the current result ofsum(String)for the field; throws if that operation was not added.protected RecordinterceptRecord(Record record) Deprecated.Overridden by subclasses to transform, drop, or observe a record on its way through this proxy.Deprecated.Adds an operation tracking the field's largest non-null value.Deprecated.Adds an operation tracking the field's smallest value, which becomes null once a null value is read.voidopen()Deprecated.Makes this endpoint ready for reading or writing.voidreset()Deprecated.Clears the accumulated result of every operation; called byopen().Deprecated.Adds an operation summing the field's non-null values as aDouble.toString()Deprecated.Methods inherited from class com.northconcepts.datapipeline.core.ProxyReader
available, close, getNestedReader, map, map, readImpl, setNestedDataReader, setNestedDataReaderMethods inherited from class com.northconcepts.datapipeline.core.DataReader
addLineage, getBufferSize, getNestedEndpoint, getReader, getRootEndpoint, getRootReader, isExhausted, isLineageSupported, isSaveLineage, peek, pop, push, read, setSaveLineage, skipMethods inherited from class com.northconcepts.datapipeline.core.DataEndpoint
decrementRecordCount, enableJmx, getLastRecord, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, incrementRecordCount, isRecordCountBigInteger, resetRecordCountMethods inherited from class com.northconcepts.datapipeline.core.Endpoint
addElapsedtime, assertClosed, assertNotOpened, assertOpened, finalize, getClosedOn, getDescription, getElapsedTime, getElapsedTimeAsString, getOpenedOn, getOpenElapsedTime, getOpenElapsedTimeAsString, getSelfTime, getSelfTimeAsString, getState, isCaptureElapsedTime, isClosed, isOpen, setCaptureElapsedTime, setDescription
-
Constructor Details
-
AggregateReader
Deprecated.
-
-
Method Details
-
addExceptionProperties
Deprecated.Description copied from class:EndpointAdds this endpoint's current state to aDataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information.- Overrides:
addExceptionPropertiesin classProxyReader
-
interceptRecord
Deprecated.Description copied from class:ProxyReaderOverridden by subclasses to transform, drop, or observe a record on its way through this proxy.Contract for subclasses (see also
docs/authoring/ProxyReader.md):- Return the record (possibly modified) to pass it downstream.
- Return
nullto drop the record; the framework reads the next one. - Throw to fail the pipeline; the framework wraps the throwable in a
DataExceptionwith.setRecord(record). - The nested
DataReaderis opened and closed for you; do not read from it here. - Do not call
DataEndpoint.incrementRecordCount()here.
- Overrides:
interceptRecordin classProxyReader- Throws:
Throwable
-
add
Deprecated.Adds operations to apply to each record; an operation replaces any existing one with the same name and field. -
clear
Deprecated. -
reset
public void reset()Deprecated.Clears the accumulated result of every operation; called byopen(). -
open
Deprecated.Description copied from class:DataEndpointMakes this endpoint ready for reading or writing.- Overrides:
openin classProxyReader- Throws:
DataException
-
minimum
Deprecated.Adds an operation tracking the field's smallest value, which becomes null once a null value is read. -
maximum
Deprecated.Adds an operation tracking the field's largest non-null value. -
sum
Deprecated.Adds an operation summing the field's non-null values as aDouble. -
average
Deprecated.Adds an operation averaging the field's non-null values as aDouble(NaN if there are none). -
count
Deprecated.Adds an operation counting the records whose field is not null. -
getMinimum
Deprecated.Returns the current result ofminimum(String)for the field; throws if that operation was not added. -
getMaximum
Deprecated.Returns the current result ofmaximum(String)for the field; throws if that operation was not added. -
getSum
Deprecated.Returns the current result ofsum(String)for the field; throws if that operation was not added. -
getAverage
Deprecated.Returns the current result ofaverage(String)for the field; throws if that operation was not added. -
getCount
Deprecated.Returns the current result ofcount(String)for the field; throws if that operation was not added. -
toString
Deprecated.- Overrides:
toStringin classDataEndpoint
-
GroupByReaderinstead. GroupByReader provides the same functionality and can return continuous results