final case class KafkaSourceConfig(id: ID, description: Option[NonEmptyString], connection: ID, topics: Seq[NonEmptyString] = Seq.empty, topicPattern: Option[NonEmptyString], startingOffsets: Option[NonEmptyString], endingOffsets: Option[NonEmptyString], persist: Option[StorageLevel], windowBy: StreamWindowing = ProcessingTime, keyFormat: KafkaTopicFormat = KafkaTopicFormat.String, valueFormat: KafkaTopicFormat = KafkaTopicFormat.String, keySchema: Option[ID] = None, valueSchema: Option[ID] = None, subtractSchemaId: Boolean = false, options: Seq[SparkParam] = Seq.empty, keyFields: Seq[NonEmptyString] = Seq.empty, metadata: Seq[SparkParam] = Seq.empty) extends SourceConfig with Product with Serializable
Kafka source configuration
- id
Source ID
- description
Source description
- connection
Connection ID (must be a Kafka Connection)
- topics
Sequence of topics to read
- topicPattern
Pattern that defined topics to read
- startingOffsets
Json-string defining starting offsets. If none is set, then "earliest" is used in batch jobs and "latest is used in streaming jobs.
- endingOffsets
Json-string defining ending offset. Applicable only to batch jobs. If none is set then "latest" is used.
- persist
Spark storage level in order to persist dataframe during job execution.
- windowBy
Source of timestamp used to build windows. Applicable only for streaming jobs! Default: processingTime - uses current timestamp at the moment when Spark processes row. Other options are:
- eventTime - uses Kafka message creation timestamp.
- customTime(columnName) - uses arbitrary user-defined column from kafka message (column must be of TimestampType)
- keyFormat
Message key format. Default: string.
- valueFormat
Message value format. Default: string.
- keySchema
Schema ID. Used to parse message key. Ignored when keyFormat is string. Mandatory for other formats.
- valueSchema
Schema ID. Used to parse message value. Ignored when valueFormat is string. Mandatory for other formats. Used to parse kafka message value.
- subtractSchemaId
Boolean flag indicating whether a kafka message schema ID encoded into its value, i.e. [1 Magic Byte] + [4 Schema ID Bytes] + [Message Value Binary Data]. If set to
true
, then first five bytes are subtracted before value parsing. Default:false
- options
Sequence of additional Kafka options
- keyFields
Sequence of key fields (columns that identify data row)
- metadata
List of metadata parameters specific to this source
- Alphabetic
- By Inheritance
- KafkaSourceConfig
- Product
- Equals
- SourceConfig
- JobConfigEntity
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
KafkaSourceConfig(id: ID, description: Option[NonEmptyString], connection: ID, topics: Seq[NonEmptyString] = Seq.empty, topicPattern: Option[NonEmptyString], startingOffsets: Option[NonEmptyString], endingOffsets: Option[NonEmptyString], persist: Option[StorageLevel], windowBy: StreamWindowing = ProcessingTime, keyFormat: KafkaTopicFormat = KafkaTopicFormat.String, valueFormat: KafkaTopicFormat = KafkaTopicFormat.String, keySchema: Option[ID] = None, valueSchema: Option[ID] = None, subtractSchemaId: Boolean = false, options: Seq[SparkParam] = Seq.empty, keyFields: Seq[NonEmptyString] = Seq.empty, metadata: Seq[SparkParam] = Seq.empty)
- id
Source ID
- description
Source description
- connection
Connection ID (must be a Kafka Connection)
- topics
Sequence of topics to read
- topicPattern
Pattern that defined topics to read
- startingOffsets
Json-string defining starting offsets. If none is set, then "earliest" is used in batch jobs and "latest is used in streaming jobs.
- endingOffsets
Json-string defining ending offset. Applicable only to batch jobs. If none is set then "latest" is used.
- persist
Spark storage level in order to persist dataframe during job execution.
- windowBy
Source of timestamp used to build windows. Applicable only for streaming jobs! Default: processingTime - uses current timestamp at the moment when Spark processes row. Other options are:
- eventTime - uses Kafka message creation timestamp.
- customTime(columnName) - uses arbitrary user-defined column from kafka message (column must be of TimestampType)
- keyFormat
Message key format. Default: string.
- valueFormat
Message value format. Default: string.
- keySchema
Schema ID. Used to parse message key. Ignored when keyFormat is string. Mandatory for other formats.
- valueSchema
Schema ID. Used to parse message value. Ignored when valueFormat is string. Mandatory for other formats. Used to parse kafka message value.
- subtractSchemaId
Boolean flag indicating whether a kafka message schema ID encoded into its value, i.e. [1 Magic Byte] + [4 Schema ID Bytes] + [Message Value Binary Data]. If set to
true
, then first five bytes are subtracted before value parsing. Default:false
- options
Sequence of additional Kafka options
- keyFields
Sequence of key fields (columns that identify data row)
- metadata
List of metadata parameters specific to this source
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
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val connection: ID
-
val
description: Option[NonEmptyString]
- Definition Classes
- KafkaSourceConfig → JobConfigEntity
- val endingOffsets: Option[NonEmptyString]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
val
id: ID
- Definition Classes
- KafkaSourceConfig → JobConfigEntity
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
keyFields: Seq[NonEmptyString]
- Definition Classes
- KafkaSourceConfig → SourceConfig
- val keyFormat: KafkaTopicFormat
- val keySchema: Option[ID]
-
val
metadata: Seq[SparkParam]
- Definition Classes
- KafkaSourceConfig → JobConfigEntity
-
val
metadataString: Option[String]
- Definition Classes
- JobConfigEntity
-
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: Seq[SparkParam]
-
val
persist: Option[StorageLevel]
- Definition Classes
- KafkaSourceConfig → SourceConfig
- val startingOffsets: Option[NonEmptyString]
-
val
streamable: Boolean
- Definition Classes
- KafkaSourceConfig → SourceConfig
- val subtractSchemaId: Boolean
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val topicPattern: Option[NonEmptyString]
- val topics: Seq[NonEmptyString]
- val valueFormat: KafkaTopicFormat
- val valueSchema: Option[ID]
-
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()
- val windowBy: StreamWindowing