title: Structured streaming debugging input
body: <p>Is there a way for me to print out the incoming data? For e.g. I have a readStream on a folder looking for JSON files, however there seems to be an issue as I am seeing 'nulls' in the aggregation output.</p>
  
  <pre class="lang-scala prettyprint-override"><code>val schema = StructType(
        StructField("id", LongType, false) ::
        StructField("sid", IntegerType, true) ::
        StructField("data", ArrayType(IntegerType, false), true) :: Nil)
  
  val lines = spark.
        readStream.
        schema(schema).
        json("in/*.json")
  
  val top1 = lines.groupBy("id").count()
  
  val query = top1.writeStream
        .outputMode("complete")
        .format("console")
        .option("truncate", "false")
        .start()
  </code></pre>