sqlContext.createDataFrame(sc.emptyRDD[Row], schema) in scala code example Example: how to create empty data frame in scala val df = spark.emptyDataFrame