Class PipelineInput
java.lang.Object
com.northconcepts.datapipeline.foundations.core.Bean
com.northconcepts.datapipeline.foundations.core.FoundationObject
com.northconcepts.datapipeline.foundations.pipeline.PipelineObject
com.northconcepts.datapipeline.foundations.pipeline.PipelineInput
- All Implemented Interfaces:
DataExceptionContributor,JsonSerializable,RecordSerializable,XmlSerializable,DataReaderFactory,JavaCodeGenerator,Serializable
- Direct Known Subclasses:
DataReaderPipelineInput,DatasetPipelineInput,FileSourcePipelineInput,JdbcPipelineInput,ProxyPipelineInput
Base class for the sources a pipeline reads its records from, such as CSV, Excel, fixed-width, JSON or XML files, JDBC
queries and datasets.
- See Also:
-
Field Summary
Fields inherited from class com.northconcepts.datapipeline.foundations.core.FoundationObject
internalId, internalName, log, TIMESTAMP_FORMATFields inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
SERIALIZED_CLASS_NAME, TYPEFields inherited from interface com.northconcepts.datapipeline.core.XmlSerializable
XML_SERIALIZED_CLASS_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromRecord(Record source) Loads this instance's state from a record and returnsthis(for fluid API call chaining).fromXmlElement(Element element) abstract StringgetName()Returns a display name for this input, such as the source's name followed by its format.Returns thePipelineInputheld inside this one ornullif there isn't one.<T extends PipelineInput>
TgetPipelineInput(Class<T> type) Searches for a nestedPipelineInputof the specified type within this pipeline input hierarchy.Returns the deepest, nestedPipelineInputheld inside this one, otherwise this instance is returned if there aren't any nestedPipelineInputs.booleanIndicates if this input can save data lineage on the records it reads (false unless a subclass overrides it).booleanIndicates if data lineage (where each record and field came from) is saved on the records read (defaults to false).setSaveLineage(boolean saveLineage) Indicates if data lineage (where each record and field came from) is saved on the records read (defaults to false); enabling it throws an exception if lineage is not supported.toRecord()Converts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.toXmlElement(Document document) Returns an element, created withdocument, describing this object; the default implementation throws aDataException.Methods inherited from class com.northconcepts.datapipeline.foundations.core.FoundationObject
addExceptionProperties, assertValid, assertValid, clone, exception, exception, exception, getInternalId, getInternalName, resetInternalIdMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.northconcepts.datapipeline.core.DataExceptionContributor
addExceptionPropertiesMethods inherited from interface com.northconcepts.datapipeline.job.DataReaderFactory
createDataReaderMethods inherited from interface com.northconcepts.datapipeline.sourcecode.JavaCodeGenerator
generateJavaCode
-
Constructor Details
-
PipelineInput
public PipelineInput()
-
-
Method Details
-
getName
Returns a display name for this input, such as the source's name followed by its format. -
isLineageSupported
public boolean isLineageSupported()Indicates if this input can save data lineage on the records it reads (false unless a subclass overrides it). -
isSaveLineage
public boolean isSaveLineage()Indicates if data lineage (where each record and field came from) is saved on the records read (defaults to false). -
getNestedPipelineInput
Returns thePipelineInputheld inside this one ornullif there isn't one. -
getRootPipelineInput
Returns the deepest, nestedPipelineInputheld inside this one, otherwise this instance is returned if there aren't any nestedPipelineInputs. -
getPipelineInput
Searches for a nestedPipelineInputof the specified type within this pipeline input hierarchy.This method first checks if the current instance is assignable to the specified type. If not, it traverses through all nested
PipelineInputs to find one that matches the type.- Type Parameters:
T- the type ofPipelineInputto search for- Parameters:
type- the class of thePipelineInputtype to find- Returns:
- the first matching
PipelineInputof the specified type, ornullif not found
-
setSaveLineage
Indicates if data lineage (where each record and field came from) is saved on the records read (defaults to false); enabling it throws an exception if lineage is not supported. -
toRecord
Description copied from interface:RecordSerializableConverts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.- Specified by:
toRecordin interfaceRecordSerializable- Overrides:
toRecordin classBean
-
fromRecord
Description copied from interface:RecordSerializableLoads this instance's state from a record and returnsthis(for fluid API call chaining). For fluid API call chaining, the overridden method should change the declared return type to its class.- Specified by:
fromRecordin interfaceRecordSerializable- Overrides:
fromRecordin classBean- Parameters:
source-- Returns:
- this instance.
-
toXmlElement
Description copied from interface:XmlSerializableReturns an element, created withdocument, describing this object; the default implementation throws aDataException.- Specified by:
toXmlElementin interfaceXmlSerializable
-
fromXmlElement
- Specified by:
fromXmlElementin interfaceXmlSerializable
-