Class

za.co.absa.abris.avro.AvroSerDe

DataframeDeserializer

Related Doc: package AvroSerDe

Permalink

implicit class DataframeDeserializer extends AvroRowConverter

This class provides the method that converts binary Avro records from a Dataframe into Spark Rows on the fly.

It loads binary data from a stream and feed them into an Avro/Spark decoder, returning the resulting rows.

It requires the path to the Avro schema which defines the records to be read.

Linear Supertypes
AvroRowConverter, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DataframeDeserializer
  2. AvroRowConverter
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DataframeDeserializer(dataframe: Dataset[Row])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. def fromAvro(schemaRegistryConf: Map[String, String]): Dataset[Row]

    Permalink

    Loads the schema from Schema Registry.

  10. def fromAvro(schemaPath: String): Dataset[Row]

    Permalink

    Loads the schema from a file.

  11. def fromAvroToRow(dataframe: Dataset[Row], schemaRegistryConf: Map[String, String]): Dataset[Row]

    Permalink

    Converts the binary Avro records contained in the Dataframe into regular Rows with a SQL schema whose specification is translated from the Avro schema informed.

    Converts the binary Avro records contained in the Dataframe into regular Rows with a SQL schema whose specification is translated from the Avro schema informed.

    Attributes
    protected
    Definition Classes
    AvroRowConverter
  12. def fromAvroToRow(dataframe: Dataset[Row], schemaPath: String): Dataset[Row]

    Permalink

    Converts the binary Avro records contained in the Dataframe into regular Rows with a SQL schema whose specification is translated from the Avro schema informed.

    Converts the binary Avro records contained in the Dataframe into regular Rows with a SQL schema whose specification is translated from the Avro schema informed.

    Attributes
    protected
    Definition Classes
    AvroRowConverter
  13. def fromConfluentAvro(schemaPath: Option[String], schemaRegistryConf: Option[Map[String, String]]): Dataset[Row]

    Permalink

    This method supports schema changes from Schema Registry.

    This method supports schema changes from Schema Registry. However, the conversion between Avro records and Spark rows relies on RowEncoders, which are defined before the job starts. Thus, although the schema changes are supported while reading, they are not translated to RowEncoders, which could take to errors in the final data.

    Refer to the ScalaConfluentKafkaAvroDeserializer.deserialize() documentation to better understand how this operation is performed.

  14. def fromConfluentAvroToRow(dataframe: Dataset[Row], schemaPath: Option[String], schemaRegistryConf: Option[Map[String, String]]): Dataset[Row]

    Permalink

    Converts Dataframes of binary Avro records into Dataframes of type Spark data.

    Converts Dataframes of binary Avro records into Dataframes of type Spark data.

    Highlights:

    1. Either, the path to a schema stored in a file system or the configuration to access a Confluent's Schema Registry instance must be informed.

    2. The RowEncoder for the resulting Dataframes will be created here, thus. If a schema path is informed, the schema under that path will be used to create the RowEncoder, otherwise, the schema retrieved from Schema Registry will be used.

    To allow the retrieval of a remote schema, the API will look into the configurations for:

    1. the topic name b. the Schema Registry URLs c. The schema version
    Attributes
    protected
    Definition Classes
    AvroRowConverter
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  22. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AvroRowConverter

Inherited from AnyRef

Inherited from Any

Ungrouped