Complete the code to read a streaming data source in Kappa architecture.
stream = spark.readStream.format([1]).load()Complete the code to write streaming data to a sink in Kappa architecture.
query = stream.writeStream.format([1]).start()Fix the error in the code to correctly select the value field from Kafka streaming data.
values = stream.selectExpr("CAST([1] AS STRING)")
Fill both blanks to filter streaming data for messages containing the word 'error'.
filtered = stream.filter([1].contains([2]))
Fill all three blanks to create a streaming aggregation counting messages by key.
counts = stream.groupBy([1]).count().orderBy([2], [3])
