Class ParquetPipelineOutput
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.PipelineOutput
com.northconcepts.datapipeline.foundations.pipeline.output.FileSinkPipelineOutput
com.northconcepts.datapipeline.parquet.output.ParquetPipelineOutput
- All Implemented Interfaces:
DataExceptionContributor,JsonSerializable,RecordSerializable,XmlSerializable,DataWriterFactory,JavaCodeGenerator,Serializable
A pipeline output that writes an Apache Parquet file to a
FileSink's path using a ParquetDataWriter.- 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 pipelineOutputElement) voidAppends Java source code representing this object to the given builder.CompressionCodecNameIndicates the compression used for writing (default UNCOMPRESSED).Returns the Parquet configuration parameters.intReturns the default scale used when writing BigDecimal values (default 5).intReturns the default precision used when writing BigDecimal invalid input: '&' BigInteger values (default 25).getName()Returns a display name for this output, such as the destination's name followed by its format.intIndicates the rounding algorithm used for all BigDecimal values (default isRoundingMode.HALF_UP).MessageTypeReturns the schema used to write the file.booleanIndicates if all datetime fields should be marked as AdjustedToUTC.booleanIndicates if characters other than letters, digits, '_' and '-' are removed from field names (default is true).setCacheFolder(String cacheFolder) setCompressionCodecName(CompressionCodecName compressionCodecName) Indicates the compression used for writing (default UNCOMPRESSED).setConfiguration(String key, String value) Sets a single Parquet configuration parameter, keeping the others.setConfiguration(Map<String, String> configuration) Sets the Parquet configuration parameters.setDefaultAdjustedToUTC(boolean defaultAdjustedToUTC) Indicates if all datetime fields should be marked as AdjustedToUTC.setDefaultBigDecimalScale(int defaultBigDecimalScale) Sets the default scale used when writing BigDecimal values (default 5).setDefaultBigNumberPrecision(int defaultBigNumberPrecision) Sets the default precision used when writing BigDecimal invalid input: '&' BigInteger values (default 25).setFileSink(FileSink fileSink) setMaxRecordsAnalyzed(Long maxRecordsAnalyzed) Indicates how many records should be analyzed and cached to generate the Parquet schema if no schema was explicitly set on this writer (default is 1000).setRecordsPerCacheFile(int recordsPerCacheFile) setRemoveUnsupportedChars(boolean removeUnsupportedChars) Indicates if characters other than letters, digits, '_' and '-' are removed from field names (default is true).setRoundingMode(RoundingMode roundingMode) Indicates the rounding algorithm used for all BigDecimal values (default isRoundingMode.HALF_UP).setSchema(MessageType schema) Sets the schema used to write the file.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.pipeline.output.FileSinkPipelineOutput
generateSaveCodeMethods inherited from class com.northconcepts.datapipeline.foundations.pipeline.PipelineOutput
getNestedPipelineOutput, getPipelineOutput, getRootPipelineOutputMethods 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
addExceptionProperties
-
Constructor Details
-
ParquetPipelineOutput
public ParquetPipelineOutput()
-
-
Method Details
-
getName
Description copied from class:PipelineOutputReturns a display name for this output, such as the destination's name followed by its format.- Overrides:
getNamein classFileSinkPipelineOutput
-
createDataWriter
-
getFileSink
- Specified by:
getFileSinkin classFileSinkPipelineOutput
-
setFileSink
- Specified by:
setFileSinkin classFileSinkPipelineOutput
-
getCompressionCodecName
public CompressionCodecName getCompressionCodecName()Indicates the compression used for writing (default UNCOMPRESSED). -
getConfiguration
Returns the Parquet configuration parameters. -
setConfiguration
Sets the Parquet configuration parameters. -
setConfiguration
Sets a single Parquet configuration parameter, keeping the others. -
setCompressionCodecName
Indicates the compression used for writing (default UNCOMPRESSED). -
isDefaultAdjustedToUTC
public boolean isDefaultAdjustedToUTC()Indicates if all datetime fields should be marked as AdjustedToUTC. -
setDefaultAdjustedToUTC
Indicates if all datetime fields should be marked as AdjustedToUTC. -
getRoundingMode
Indicates the rounding algorithm used for all BigDecimal values (default isRoundingMode.HALF_UP). -
setRoundingMode
Indicates the rounding algorithm used for all BigDecimal values (default isRoundingMode.HALF_UP). -
getSchema
public MessageType getSchema()Returns the schema used to write the file. -
setSchema
Sets the schema used to write the file. -
getDefaultBigDecimalScale
public int getDefaultBigDecimalScale()Returns the default scale used when writing BigDecimal values (default 5). -
setDefaultBigDecimalScale
Sets the default scale used when writing BigDecimal values (default 5). -
getDefaultBigNumberPrecision
public int getDefaultBigNumberPrecision()Returns the default precision used when writing BigDecimal invalid input: '&' BigInteger values (default 25). -
setDefaultBigNumberPrecision
Sets the default precision used when writing BigDecimal invalid input: '&' BigInteger values (default 25). -
setMaxRecordsAnalyzed
Indicates how many records should be analyzed and cached to generate the Parquet schema if no schema was explicitly set on this writer (default is 1000). This value will not be used if a schema was set on this writer.
Passing innullwill cause all records to be read and cached to determine the schema.
The value will be set to 1 if a value less than 1 is passed in.
Note: Usingnullor a high record count can significantly slow down processing and cause anOutOfMemoryError. -
getCacheFolder
-
setCacheFolder
-
getRecordsPerCacheFile
public int getRecordsPerCacheFile() -
setRecordsPerCacheFile
-
isRemoveUnsupportedChars
public boolean isRemoveUnsupportedChars()Indicates if characters other than letters, digits, '_' and '-' are removed from field names (default is true). -
setRemoveUnsupportedChars
Indicates if characters other than letters, digits, '_' and '-' are removed from field names (default is true). -
generateJavaCode
Description copied from interface:JavaCodeGeneratorAppends Java source code representing this object to the given builder. -
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 classPipelineOutput- 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- Overrides:
toXmlElementin classPipelineOutput
-
fromXmlElement
-