https://stackoverflow.com/questions/44280360/how-to-convert-datasetrow-to-dataset-of-json-messages-to-write-to-kafka
Thanks!
On Wed, May 31, 2017 at 1:41 AM, kant kodali wrote:
> small correction.
>
> If I try to convert a Row into a Json String it results into something
> like this {"key1", "n
small correction.
If I try to convert a Row into a Json String it results into something like
this {"key1", "name", "value1": "hello", "key2", "ratio", "value2": 1.56 ,
"key3", "count", "value3": 34} but *what I need is something like this {
result: {"name": "hello", "ratio": 1.56, "count": 34} }
Hi Jules,
I read that blog several times prior to asking this question.
Thanks!
On Wed, May 31, 2017 at 12:12 AM, Jules Damji wrote:
> Hello Kant,
>
> See is the examples in this blog explains how to deal with your particular
> case: https://databricks.com/blog/2017/02/23/working-complex-data-
Hello Kant,
See is the examples in this blog explains how to deal with your particular
case:
https://databricks.com/blog/2017/02/23/working-complex-data-formats-structured-streaming-apache-spark-2-1.html
Cheers
Jules
Sent from my iPhone
Pardon the dumb thumb typos :)
> On May 30, 2017, at 7
Hi All,
I have a Dataset and I am trying to convert it into Dataset
(json String) using Spark Structured Streaming. I have tried the following.
df2.toJSON().writeStream().foreach(new KafkaSink())
This doesn't seem to work for the following reason.
"Queries with streaming sources must be execute