This is different from How to create an empty DataFrame with a specified schema?
The difference is I am asking "without SparkContext". The reason I ask this requirement is
Since Spark 2.x.x, All three data abstractions are unified and SparkSession is the unified entry point of Spark.
If they are all unified, can we create an empty DataFrame with specified schema without SparkContext
(with SparkSession
only)
Basically, I am looking for something like SparkSession.createDataFrame
.