title: How to get only values from kafka sources to spark?
body: <p>I'm getting logs from kafka sources, and put it into spark.<br>
  Format of logs which are saved in my hadoop_path looks like this<br>
  <code>{"value":"{\"Name\":\"Amy\",\"Age\":\"22\"}"}</code><br>
  <code>{"value":"{\"Name\":\"Jin\",\"Age\":\"26\"}"}</code>  </p>
  
  <p>But, I want to make this like<br>
  <code>{\"Name\":\"Amy\",\"Age\":\"22\"}</code><br>
  <code>{\"Name\":\"Jin\",\"Age\":\"26\"}</code>  </p>
  
  <p>Any kind of solution will be great. (Using pure Java code, Spark SQL, or Kafka)  </p>
  
  <pre><code>        SparkSession spark = SparkSession.builder()
                  .master("local")
                  .appName("MYApp").getOrCreate();
          Dataset&lt;Row&gt; df = spark
                  .readStream()
                  .format("kafka")
                  .option("kafka.bootstrap.servers", Kafka_source)
                  .option("subscribe", Kafka_topic)
                  .option("startingOffsets", "earliest")
                  .option("failOnDataLoss",false)
                  .load();
          Dataset&lt;Row&gt; dg = df.selectExpr("CAST(value AS STRING)");
          StreamingQuery queryone = dg.writeStream()
                  .format("json")
                  .outputMode("append")
                  .option("checkpointLocation",Hadoop_path)
                  .option("path",Hadoop_path)
                  .start();
  </code></pre>