case class KafkaWriterOptions(brokers: String, topic: String, schemaRegistryUrl: Option[String], format: Option[String], compressionType: Option[String], keyColumn: Option[String], saveMode: SaveMode = SaveMode.Append, replicationFactor: Int, partitions: Int, options: Map[String, String]) extends Product with Serializable
A case class representing the Kafka writer options required for writing data from a DataFrame to a Kafka topic.
- brokers
The Kafka brokers in the format "host1:port1,host2:port2,...".
- topic
The name of the Kafka topic to which data will be written.
- schemaRegistryUrl
Optional URL for the Confluent Schema Registry when writing data in Avro format (default: None).
- format
Optional format for the data (json or avro) when writing to Kafka (default: None).
- compressionType
Optional compression type for the Kafka producer (default: None).
- keyColumn
Optional column name to be used as the Kafka message key (default: None).
- saveMode
The SaveMode for writing data to Kafka (default: SaveMode.Append).
- replicationFactor
The replication factor for creating the Kafka topic.
- partitions
The number of partitions for creating the Kafka topic.
- options
Additional options to be passed to the Kafka producer (default: Map.empty).
- Alphabetic
- By Inheritance
- KafkaWriterOptions
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
KafkaWriterOptions(brokers: String, topic: String, schemaRegistryUrl: Option[String], format: Option[String], compressionType: Option[String], keyColumn: Option[String], saveMode: SaveMode = SaveMode.Append, replicationFactor: Int, partitions: Int, options: Map[String, String])
- brokers
The Kafka brokers in the format "host1:port1,host2:port2,...".
- topic
The name of the Kafka topic to which data will be written.
- schemaRegistryUrl
Optional URL for the Confluent Schema Registry when writing data in Avro format (default: None).
- format
Optional format for the data (json or avro) when writing to Kafka (default: None).
- compressionType
Optional compression type for the Kafka producer (default: None).
- keyColumn
Optional column name to be used as the Kafka message key (default: None).
- saveMode
The SaveMode for writing data to Kafka (default: SaveMode.Append).
- replicationFactor
The replication factor for creating the Kafka topic.
- partitions
The number of partitions for creating the Kafka topic.
- options
Additional options to be passed to the Kafka producer (default: Map.empty).
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val brokers: String
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val compressionType: Option[String]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- val format: Option[String]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val keyColumn: Option[String]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val options: Map[String, String]
- val partitions: Int
- val replicationFactor: Int
- val saveMode: SaveMode
- val schemaRegistryUrl: Option[String]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val topic: String
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()