I am using spark-csv to load data into a DataFrame. I want to do a simple query and display the content:
val df = sqlContext.read.format(\"com.databricks.spa
In c# Option("truncate", false)
does not truncate data in the output.
StreamingQuery query = spark
.Sql("SELECT * FROM Messages")
.WriteStream()
.OutputMode("append")
.Format("console")
.Option("truncate", false)
.Start();
Below code would help to view all rows without truncation in each column
df.show(df.count(), False)
results.show(false)
will show you the full column content.
Show method by default limit to 20, and adding a number before false
will show more rows.
Tried this in pyspark
df.show(truncate=0)
If you put results.show(false)
, results will not be truncated
results.show(20, False)
or results.show(20, false)
depending on whether you are running it on Java/Scala/Python