Class AvroPipelineOutput

All Implemented Interfaces:
DataExceptionContributor, JsonSerializable, RecordSerializable, XmlSerializable, DataWriterFactory, JavaCodeGenerator, Serializable

public class AvroPipelineOutput extends FileSinkPipelineOutput
A pipeline output that writes Apache Avro data to a FileSink using an AvroWriter.
See Also:
  • Constructor Details

    • AvroPipelineOutput

      public AvroPipelineOutput()
  • Method Details

    • createDataWriter

      public DataWriter createDataWriter()
    • generateJavaCode

      public void generateJavaCode(JavaCodeBuilder code)
      Description copied from interface: JavaCodeGenerator
      Appends Java source code representing this object to the given builder.
    • getFileSink

      public FileSink getFileSink()
      Specified by:
      getFileSink in class FileSinkPipelineOutput
    • setFileSink

      public AvroPipelineOutput setFileSink(FileSink fileSink)
      Specified by:
      setFileSink in class FileSinkPipelineOutput
    • getDiscardWriter

      public DataWriter getDiscardWriter()
      Returns the writer that receives records not matching the Avro schema or null if such records fail the write.
    • setDiscardWriter

      public AvroPipelineOutput setDiscardWriter(DataWriter discardWriter)
      Sets the writer that receives records not matching the Avro schema; when null, such records fail the write.
    • isWriteUuidAsString

      public boolean isWriteUuidAsString()

      Indicates whether UUID values are written as strings or bytes. If set to false, UUID values will be written as bytes.


      Default value is true.

    • setWriteUuidAsString

      public AvroPipelineOutput setWriteUuidAsString(boolean writeUuidAsString)

      Indicates whether UUID values are written as strings or bytes. If set to false, UUID values will be written as bytes.


      Default value is true.

    • isRemoveUnsupportedChars

      public boolean isRemoveUnsupportedChars()
      Indicates if characters other than letters, digits, '_' and '-' are removed from field names (default is true).
    • setRemoveUnsupportedChars

      public AvroPipelineOutput setRemoveUnsupportedChars(boolean removeUnsupportedChars)
      Indicates if characters other than letters, digits, '_' and '-' are removed from field names (default is true).
    • getDefaultBigDecimalScale

      public int getDefaultBigDecimalScale()
      Returns the default scale used when writing BigDecimal values (default 5).
    • setDefaultBigDecimalScale

      public AvroPipelineOutput setDefaultBigDecimalScale(int defaultBigDecimalScale)
      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

      public AvroPipelineOutput setDefaultBigNumberPrecision(int defaultBigNumberPrecision)
      Sets the default precision used when writing BigDecimal invalid input: '&' BigInteger values (default 25).
    • getName

      public String getName()
      Description copied from class: PipelineOutput
      Returns a display name for this output, such as the destination's name followed by its format.
      Overrides:
      getName in class FileSinkPipelineOutput
    • toRecord

      public Record toRecord()
      Description copied from interface: RecordSerializable
      Converts this object's state to a record that RecordSerializable.fromRecord(Record) can load.
      Specified by:
      toRecord in interface RecordSerializable
      Overrides:
      toRecord in class Bean
    • fromRecord

      public AvroPipelineOutput fromRecord(Record source)
      Description copied from interface: RecordSerializable
      Loads this instance's state from a record and returns this (for fluid API call chaining). For fluid API call chaining, the overridden method should change the declared return type to its class.
      Specified by:
      fromRecord in interface RecordSerializable
      Overrides:
      fromRecord in class PipelineOutput
      Parameters:
      source -
      Returns:
      this instance.
    • toXmlElement

      public Element toXmlElement(Document document)
      Description copied from interface: XmlSerializable
      Returns an element, created with document, describing this object; the default implementation throws a DataException.
      Specified by:
      toXmlElement in interface XmlSerializable
      Overrides:
      toXmlElement in class PipelineOutput
    • fromXmlElement

      public AvroPipelineOutput fromXmlElement(Element pipelineInputElement)