Learn R Programming

analysisPipelines (version 1.0.2)

castKafkaStreamAsString: Connect to a Spark session

Description

Connect to a Spark session

Usage

castKafkaStreamAsString(streamObj)

Arguments

streamObj

Spark Structured Streaming DataFrame returned by read.stream function with source = 'kafka'

Value

Updated Spark Structured Streaming DataFrame with key, value, topic and timestamp from the Kafka stream

Details

Takes in a Structured Stream from Kafka created from read.stream(source = 'kafka', ...) and returns a Structured Streaming DataFrame where the key and value from the Kafka stream are cast to string

See Also

Other Spark utilities: convertKafkaValueFromJson, sparkRSessionCreateIfNotPresent